must pass $args by ref to to plugin function too, if we want the plugin
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 10 Dec 2006 19:37:11 +0000 (19:37 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 10 Dec 2006 19:37:11 +0000 (19:37 +0000)
to be able to modify it

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11992 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/plugin.php

index c4df4a308df8b1e4a36aef945f6c4fc98b2847ac..20ccf4c39c2c0d196cf189af3e551c3832fa7554 100644 (file)
@@ -80,7 +80,7 @@ function do_hook($name, &$args) {
         foreach ($squirrelmail_plugin_hooks[$name] as $plugin_name => $function) {
             use_plugin($plugin_name);
             if (function_exists($function)) {
         foreach ($squirrelmail_plugin_hooks[$name] as $plugin_name => $function) {
             use_plugin($plugin_name);
             if (function_exists($function)) {
-                $ret = $function($args, $ret);
+                $ret = $function(&$args, $ret);
             }
         }
     }
             }
         }
     }
@@ -219,11 +219,12 @@ function boolean_hook_function($name, &$args, $priority=0, $tie=false) {
 }
 
 /**
 }
 
 /**
+ * Do not use, use checkForJavascript() instead.
+ *
  * This function checks whether the user's USER_AGENT is known to
  * be broken. If so, returns true and the plugin is invisible to the
  * offending browser.
  * *** THIS IS A TEST FOR JAVASCRIPT SUPPORT ***
  * This function checks whether the user's USER_AGENT is known to
  * be broken. If so, returns true and the plugin is invisible to the
  * offending browser.
  * *** THIS IS A TEST FOR JAVASCRIPT SUPPORT ***
- * FIXME: This function needs to have its name changed!
  *
  * @return bool whether this browser properly supports JavaScript
  * @deprecated use checkForJavascript() since 1.5.1
  *
  * @return bool whether this browser properly supports JavaScript
  * @deprecated use checkForJavascript() since 1.5.1