mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
fix not working update from 1.6 by running register-all-hooks after restore (old 1.6 wiki_bo::search_link hook can not run in setup, so we need the new hook)
This commit is contained in:
parent
747b403973
commit
797a412ec8
@ -587,6 +587,9 @@ class db_backup
|
|||||||
{
|
{
|
||||||
return lang('Restore failed');
|
return lang('Restore failed');
|
||||||
}
|
}
|
||||||
|
// search-and-register-hooks
|
||||||
|
$GLOBALS['egw']->hooks->register_all_hooks();
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,17 +308,15 @@ class hooks
|
|||||||
*/
|
*/
|
||||||
function register_all_hooks()
|
function register_all_hooks()
|
||||||
{
|
{
|
||||||
$SEP = filesystem_separator();
|
// deleting hooks, to get ride of no longer existing apps
|
||||||
|
$this->db->delete($this->table,'1=1',__LINE__,__FILE__);
|
||||||
|
|
||||||
// deleting hooks of all not longer registered apps
|
// now register all apps using just filesystem data
|
||||||
if (($all_apps = array_keys($GLOBALS['egw_info']['apps'])))
|
foreach(scandir(EGW_SERVER_ROOT) as $appname)
|
||||||
{
|
{
|
||||||
$this->db->delete($this->table,"hook_appname NOT IN ('".implode("','",$all_apps)."')",__LINE__,__FILE__);
|
if ($appname[0] == '.' || !is_dir(EGW_SERVER_ROOT.'/'.$appname)) continue;
|
||||||
}
|
|
||||||
// now register the rest again
|
$f = EGW_SERVER_ROOT . '/' . $appname . '/setup/setup.inc.php';
|
||||||
foreach($GLOBALS['egw_info']['apps'] as $appname => $app)
|
|
||||||
{
|
|
||||||
$f = EGW_SERVER_ROOT . $SEP . $appname . $SEP . 'setup' . $SEP . 'setup.inc.php';
|
|
||||||
$setup_info = array($appname => array());
|
$setup_info = array($appname => array());
|
||||||
if(@file_exists($f)) include($f);
|
if(@file_exists($f)) include($f);
|
||||||
// some apps have setup_info for more then themselfs (eg. phpgwapi for groupdav)
|
// some apps have setup_info for more then themselfs (eg. phpgwapi for groupdav)
|
||||||
|
Loading…
Reference in New Issue
Block a user