From: pdontthink Date: Tue, 20 Mar 2007 23:17:14 +0000 (+0000) Subject: Fix loss of X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1f45d1b5d05dd3cf12b61d6fb6d5d32467f5ec72;p=squirrelmail.git Fix loss of git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12343 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/plugin.php b/functions/plugin.php index 99eb79aa..d586c360 100644 --- a/functions/plugin.php +++ b/functions/plugin.php @@ -81,6 +81,12 @@ function do_hook($name, &$args) { use_plugin($plugin_name); if (function_exists($function)) { $ret = $function($args, $ret); + + // each plugin can call additional hooks, so need + // to make sure the current hook name is accurate + // again after each plugin has finished + // + $currentHookName = $name; } } } @@ -148,6 +154,12 @@ function concat_hook_function($name, &$args, $force_array=FALSE) { if (!empty($plugin_ret)) { $ret = sqm_array_merge($ret, $plugin_ret); } + + // each plugin can call additional hooks, so need + // to make sure the current hook name is accurate + // again after each plugin has finished + // + $currentHookName = $name; } } } @@ -208,6 +220,12 @@ function boolean_hook_function($name, &$args, $priority=0, $tie=false) { } else { $nay++; } + + // each plugin can call additional hooks, so need + // to make sure the current hook name is accurate + // again after each plugin has finished + // + $currentHookName = $name; } } $currentHookName = '';