diff --git a/phpgwapi/inc/class.egw_cache.inc.php b/phpgwapi/inc/class.egw_cache.inc.php index 153871c146..1ea70273e8 100644 --- a/phpgwapi/inc/class.egw_cache.inc.php +++ b/phpgwapi/inc/class.egw_cache.inc.php @@ -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 * diff --git a/setup/inc/class.setup_cmd.inc.php b/setup/inc/class.setup_cmd.inc.php index f37344c8e8..fac04a45a5 100644 --- a/setup/inc/class.setup_cmd.inc.php +++ b/setup/inc/class.setup_cmd.inc.php @@ -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; diff --git a/setup/inc/class.setup_cmd_config.inc.php b/setup/inc/class.setup_cmd_config.inc.php index b8c1dedbee..e2a1421ae7 100644 --- a/setup/inc/class.setup_cmd_config.inc.php +++ b/setup/inc/class.setup_cmd_config.inc.php @@ -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.');