This commit is contained in:
Laurent Destailleur 2013-04-07 21:09:57 +02:00
parent 64a9689473
commit b678183ff2

View File

@ -138,6 +138,8 @@ class HookManager
{
foreach($modules as $module => $actionclassinstance)
{
//var_dump(get_class($actionclassinstance).'->'.$method);
// jump to next class if method does not exists
if (! method_exists($actionclassinstance,$method)) continue;
// test to avoid to run twice a hook, when a module implements several active contexts
@ -162,7 +164,7 @@ class HookManager
}
// Generic hooks that return a string (printSearchForm, printLeftBlock, printTopRightMenu, formAddObjectLine, formBuilddocOptions, ...)
else
{
{
// TODO. this should be done into the method by returning nothing
if (is_array($parameters) && ! empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) continue;