need to consider caching when applying setup operations

This commit is contained in:
Ralf Becker 2014-04-16 17:58:12 +00:00
parent 81d0049777
commit 27a531c1c2
3 changed files with 18 additions and 0 deletions

View File

@ -562,6 +562,15 @@ class egw_cache
return $ret;
}
/**
* Unset instance key, so it get read again and re-read install_id from database
*/
static public function unset_instance_key()
{
self::$instance_key = null;
$GLOBALS['egw_info']['server']['install_id'] = egw_cache::get_system_config('install_id', false);
}
/**
* Key used for instance specific data
*

View File

@ -145,6 +145,9 @@ abstract class setup_cmd extends admin_cmd
$GLOBALS['egw_domain'][$domain]['db_pass'],
$GLOBALS['egw_domain'][$domain]['db_type']
);
// change caching to managed instance
egw_cache::unset_instance_key();
}
}
@ -165,6 +168,9 @@ abstract class setup_cmd extends admin_cmd
$GLOBALS['egw_info']['server']['db_pass'],
$GLOBALS['egw_info']['server']['db_type']
);
// change caching back to own instance
egw_cache::unset_instance_key();
if (!is_null(self::$egw_accounts_backup))
{
$GLOBALS['egw']->accounts = self::$egw_accounts_backup;

View File

@ -86,6 +86,9 @@ class setup_cmd_config extends setup_cmd
{
if ($save_ea_profile) $this->_save_ea_profile();
// flush instance cache, so above config get read from database not cache
egw_cache::flush();
$this->restore_db();
return lang('Configuration changed.');