mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 06:31:21 +00:00
fix hasHook() which still had some old code
This commit is contained in:
parent
8b2b2a12e2
commit
8a7fb230da
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user