mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +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) { /* {{{ */
|
function callHook($hook) { /* {{{ */
|
||||||
$tmp = explode('_', get_class($this));
|
$tmp = explode('_', get_class($this));
|
||||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) {
|
if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) {
|
||||||
|
$result = null;
|
||||||
foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) {
|
foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) {
|
||||||
if (method_exists($hookObj, $hook)) {
|
if (method_exists($hookObj, $hook)) {
|
||||||
switch(func_num_args()) {
|
switch(func_num_args()) {
|
||||||
|
@ -130,7 +131,7 @@ class SeedDMS_Controller_Common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return $result;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user