mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
fix for bug in register_all_hooks: if apps define hooks for other apps last app wins: seen with/for perp_ar; now all available hooks are collected first and then registered with register_hooks (loop per app)
This commit is contained in:
parent
fd4315fec3
commit
95906905e4
@ -253,6 +253,20 @@ class hooks
|
||||
if(@file_exists($f)) include($f);
|
||||
// some apps have setup_info for more then themselfs (eg. phpgwapi for groupdav)
|
||||
foreach($setup_info as $appname => $data)
|
||||
{
|
||||
if ($data['hooks'])
|
||||
{
|
||||
if ($hdata[$appname])
|
||||
{
|
||||
$hdata[$appname]['hooks'] = array_merge($hdata[$appname]['hooks'],$data['hooks']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$hdata[$appname]['hooks'] = $data['hooks'];
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach((array)$hdata as $appname => $data)
|
||||
{
|
||||
if ($data['hooks']) $this->register_hooks($appname,$data['hooks']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user