mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
handle hooks with two arguments
This commit is contained in:
parent
07d77858f0
commit
7c7dfc1411
|
@ -124,6 +124,9 @@ class SeedDMS_Controller_Common {
|
||||||
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()) {
|
||||||
|
case 3:
|
||||||
|
$result = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2));
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$result = $hookObj->$hook($this, func_get_arg(1));
|
$result = $hookObj->$hook($this, func_get_arg(1));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user