*/
function concat_hook_function($name,$parm=NULL) {
global $squirrelmail_plugin_hooks, $currentHookName;
-// $ret = '';
- $ret = array();
+ $ret = '';
$currentHookName = $name;
if (isset($squirrelmail_plugin_hooks[$name])
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);
+ }
}
}
}
/* 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;
}