only register hooks of installed apps, not all existing in filesystem, fixes fatal errors resulting from not installed apps

This commit is contained in:
Ralf Becker 2014-10-31 12:23:56 +00:00
parent 795131df35
commit 99895e0dd9

View File

@ -329,8 +329,15 @@ class hooks
// deleting hooks, to get ride of no longer existing apps
$this->db->delete($this->table,'1=1',__LINE__,__FILE__);
// if we run in setup, we need to read installed apps first
if (!$GLOBALS['egw_info']['apps'])
{
$applications = new applications();
$applications->read_installed_apps();
}
// now register all apps using just filesystem data
foreach(scandir(EGW_SERVER_ROOT) as $appname)
foreach(array_keys($GLOBALS['egw_info']['apps']) as $appname)
{
if ($appname[0] == '.' || !is_dir(EGW_SERVER_ROOT.'/'.$appname)) continue;