[Cartoweb-dev] [Bug 1336] AJAX Integration
bugzilla-daemon at bugzilla.maptools.org
bugzilla-daemon at bugzilla.maptools.org
Mon Mar 13 12:50:20 EST 2006
http://bugzilla.maptools.org/show_bug.cgi?id=1336
------- Additional Comments From sylvain.pasche at camptocamp.com 2006-03-13 12:50 -------
(From update of attachment 120)
>+ /**
>+ * Sets the enable level of the given plugin name
>+ * to the given enable level value.
>+ * to ClientPlugin::ENABLE_LEVEL_LOAD.
>+ * @param string name of the plugin to enable
>+ * @param int value of the enable level to set
>+ * @see ClientPlugin
>+ */
>+ public function setEnableLevel($pluginName, $enableLevelValue) {
>+ if (!$this->isLoaded($pluginName))
>+ throw new AjaxException("Plugin '.$pluginName.'is not loaded. " .
>+ "You can only set enable level on loaded plugins.");
Rather "Plugin '$pluginName' is not loaded. " ?
>+ $plugin = $this->getPlugin($pluginName);
>+ $plugin->setEnableLevel($enableLevelValue);
>+ }
>+
>+}
>+
>+
>+/**
[...]
>+ /**
>+ * Sets the current AJAX action
>+ * @return string Requested AJAX action, or null if no AJAX action requested
>+ */
>+ public function setAjaxAction($ajaxAction) {
>+ if (!ereg("^.+\..+$", $ajaxAction)) {
>+ throw new AjaxException(
>+ "ajaxActionRequest parameter\'s value is not correctly " .
>+ 'formatted. It should look like: PluginName.ActionName ' .
>+ '(current value: '.$ajaxAction.')');
spaces around .
>+ }
>+
>+ list($requestedPluginName, $requestedActionName) =
>+ explode('.', $ajaxAction, 2);
>+
>+ $requestedPluginName = strtolower($requestedPluginName{0})
>+
[...]
>
>+ /**
>+ * Sets the enable level (to be used with the AJAX mode).
>+ * @param int
>+ */
>+ public function setEnableLevel($enableLevel) {
>+ // TODO: Check if enableLevel exists, if not
>+ // throw new AjaxException ("ClientPlugin::$level is not defined");
I mentionned to remove this in a previous comment.
Can you check again my comments ?
And pay attention to spaces around operators. I saw some i<foo instead of i <
foo and spaces missing around dot concatenation oparator.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Please do NOT reply to this email, use the link above instead to
login to bugzilla and submit your comment. Any email reply to this
address will be lost.
More information about the Cartoweb-dev
mailing list