mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
we need 4. parameter $try_unregistered parameter in Api\Hooks::single() as it is used by Setup, which is never an installed app
This commit is contained in:
parent
4591f5c8b4
commit
6ca8d13166
@ -98,7 +98,7 @@ class Hooks
|
||||
* @param boolean $try_unregistered =false If true, try to include old file-hook anyway (for setup)
|
||||
* @return mixed False if no hook exists, True if old hook exists and whatever the new method-hook returns (can be True or False too!).
|
||||
*/
|
||||
public static function single($args, $appname = '', $no_permission_check = False)//,$try_unregistered = False)
|
||||
public static function single($args, $appname = '', $no_permission_check = False, $try_unregistered = False)
|
||||
{
|
||||
//error_log(__METHOD__."(".array2string($args).",'$appname','$no_permission_check','$try_unregistered')");
|
||||
|
||||
@ -151,6 +151,13 @@ class Hooks
|
||||
}
|
||||
}
|
||||
|
||||
// hooks only existing in filesystem used by setup
|
||||
if (!$ret && $try_unregistered && file_exists(EGW_SERVER_ROOT.($hook='/'.$appname.'/inc/hook_'.$location.'.inc.php')))
|
||||
{
|
||||
include(EGW_SERVER_ROOT.$hook);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!$ret) return false;
|
||||
|
||||
return count($ret) == 1 ? $ret[0] : $ret;
|
||||
|
Loading…
Reference in New Issue
Block a user