mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
callHook() returns null if no method was found
This commit is contained in:
parent
3bc72a46df
commit
38b7a7c660
|
@ -115,6 +115,7 @@ class SeedDMS_Controller_Common {
|
|||
function callHook($hook) { /* {{{ */
|
||||
$tmp = explode('_', get_class($this));
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) {
|
||||
$result = null;
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) {
|
||||
if (method_exists($hookObj, $hook)) {
|
||||
switch(func_num_args()) {
|
||||
|
@ -130,7 +131,7 @@ class SeedDMS_Controller_Common {
|
|||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return $result;
|
||||
}
|
||||
return null;
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user