From: pdontthink Date: Fri, 22 Sep 2006 03:43:26 +0000 (+0000) Subject: Solved recursion problem and increased efficiency of template_construct hook by addin... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=43751c9d4d34ff705a461b2bdb8c8ffc83bf5efd;ds=sidebyside Solved recursion problem and increased efficiency of template_construct hook by adding file name to the end of the hook name, such as template_construct_login.tpl. Changed hook type to use the newly reworked concat_hook_function which can support merged arrays retued from the plugins. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11735 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/template/template.class.php b/class/template/template.class.php index 43547114..f1c37c4f 100755 --- a/class/template/template.class.php +++ b/class/template/template.class.php @@ -390,8 +390,8 @@ return substr($this->template_dir, strlen(SM_PATH)); } else { $aPluginOutput = array(); - $aPluginOutput = do_hook_function('template_construct', - array($aPluginOutput, $file, $this)); + $aPluginOutput = concat_hook_function('template_construct_' . $file, + array($aPluginOutput, $this)); $this->assign('plugin_output', $aPluginOutput); // pull in our config file ($t? let's try to be more verbose please :-) ) @@ -440,8 +440,8 @@ return substr($this->template_dir, strlen(SM_PATH)); } else { $aPluginOutput = array(); - $aPluginOutput = do_hook_function('template_construct', - array($aPluginOutput, $file, $this)); + $aPluginOutput = concat_hook_function('template_construct_' . $file, + array($aPluginOutput, $this)); $this->assign('plugin_output', $aPluginOutput); // pull in our config file ($t? let's try to be more verbose please :-) )