projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't leave old code and DO check filters plugin when reporter informs about
[squirrelmail.git]
/
functions
/
plugin.php
diff --git
a/functions/plugin.php
b/functions/plugin.php
index 2bc6bff060551e711419a499b3b9cbf3f9723900..342d2ac428c156d442b2f61f9f6273cc0ee9f605 100644
(file)
--- a/
functions/plugin.php
+++ b/
functions/plugin.php
@@
-141,8
+141,7
@@
function do_hook_function($name,$parm=NULL) {
*/
function concat_hook_function($name,$parm=NULL) {
global $squirrelmail_plugin_hooks, $currentHookName;
*/
function concat_hook_function($name,$parm=NULL) {
global $squirrelmail_plugin_hooks, $currentHookName;
-// $ret = '';
- $ret = array();
+ $ret = '';
$currentHookName = $name;
if (isset($squirrelmail_plugin_hooks[$name])
$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)) {
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);
+ }
}
}
}
}
}
}
@@
-160,10
+161,6
@@
function concat_hook_function($name,$parm=NULL) {
/* Variable-length argument lists have a slight problem when */
/* passing values by reference. Pity. This is a workaround. */
/* Variable-length argument lists have a slight problem when */
/* passing values by reference. Pity. This is a workaround. */
- // FIXME: empty return array breaks legacy use of this hook, so
- // as a workaround, return empty string (let's fix the
- // hook calls so we can pull this out)
- if (empty($ret)) return '';
return $ret;
}
return $ret;
}