don't leave old code and DO check filters plugin when reporter informs about
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 30 Sep 2006 07:09:09 +0000 (07:09 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 30 Sep 2006 07:09:09 +0000 (07:09 +0000)
the way to reproduce issue.

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

functions/plugin.php

index 98f7565c86d5b39aafd21514cdb3fcab8ec1e0f7..342d2ac428c156d442b2f61f9f6273cc0ee9f605 100644 (file)
@@ -142,7 +142,6 @@ function do_hook_function($name,$parm=NULL) {
 function concat_hook_function($name,$parm=NULL) {
     global $squirrelmail_plugin_hooks, $currentHookName;
     $ret = '';
-//    $ret = array();
     $currentHookName = $name;
 
     if (isset($squirrelmail_plugin_hooks[$name])
@@ -150,8 +149,10 @@ function concat_hook_function($name,$parm=NULL) {
         foreach ($squirrelmail_plugin_hooks[$name] as $function) {
             /* Add something to set correct gettext domain for plugin. */
             if (function_exists($function)) {
-//                $ret .= $function($parm);
-                $ret = sqm_array_merge($ret, $function($parm));
+                $plugin_ret = $function($parm);
+                if (!empty($plugin_ret)) {
+                    $ret = sqm_array_merge($ret, $plugin_ret);
+                }
             }
         }
     }