fix hasHook() which still had some old code

This commit is contained in:
Uwe Steinmann 2021-07-08 11:05:27 +02:00
parent 8b2b2a12e2
commit 8a7fb230da

View File

@ -273,10 +273,12 @@ class SeedDMS_Controller_Common {
*/ */
function hasHook($hook) { /* {{{ */ function hasHook($hook) { /* {{{ */
$tmps = $this->getHookClassNames(); $tmps = $this->getHookClassNames();
if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) { foreach($tmps as $tmp) {
foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) { if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp)])) {
if (method_exists($hookObj, $hook)) { foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp)] as $hookObj) {
return true; if (method_exists($hookObj, $hook)) {
return true;
}
} }
} }
} }