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) { /* {{{ */
$tmps = $this->getHookClassNames();
if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) {
if (method_exists($hookObj, $hook)) {
return true;
foreach($tmps as $tmp) {
if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp)])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp)] as $hookObj) {
if (method_exists($hookObj, $hook)) {
return true;
}
}
}
}