forked from extern/egroupware
need to consider caching when applying setup operations
This commit is contained in:
parent
20db2d8c81
commit
3b68b8bff8
@ -568,6 +568,15 @@ class egw_cache
|
|||||||
return $ret;
|
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
|
* Key used for instance specific data
|
||||||
*
|
*
|
||||||
|
@ -138,6 +138,9 @@ abstract class setup_cmd extends admin_cmd
|
|||||||
{
|
{
|
||||||
$GLOBALS['egw']->db->disconnect();
|
$GLOBALS['egw']->db->disconnect();
|
||||||
$GLOBALS['egw']->db = new egw_db($GLOBALS['egw_domain'][$domain]);
|
$GLOBALS['egw']->db = new egw_db($GLOBALS['egw_domain'][$domain]);
|
||||||
|
|
||||||
|
// change caching to managed instance
|
||||||
|
egw_cache::unset_instance_key();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,6 +155,9 @@ abstract class setup_cmd extends admin_cmd
|
|||||||
$GLOBALS['egw']->db->disconnect();
|
$GLOBALS['egw']->db->disconnect();
|
||||||
$GLOBALS['egw']->db = new egw_db($GLOBALS['egw_info']['server']);
|
$GLOBALS['egw']->db = new egw_db($GLOBALS['egw_info']['server']);
|
||||||
|
|
||||||
|
// change caching back to own instance
|
||||||
|
egw_cache::unset_instance_key();
|
||||||
|
|
||||||
if (!is_null(self::$egw_accounts_backup))
|
if (!is_null(self::$egw_accounts_backup))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->accounts = self::$egw_accounts_backup;
|
$GLOBALS['egw']->accounts = self::$egw_accounts_backup;
|
||||||
|
@ -93,6 +93,9 @@ class setup_cmd_config extends setup_cmd
|
|||||||
{
|
{
|
||||||
if ($save_mail_account) $this->_save_mail_account($values);
|
if ($save_mail_account) $this->_save_mail_account($values);
|
||||||
|
|
||||||
|
// flush instance cache, so above config get read from database not cache
|
||||||
|
egw_cache::flush();
|
||||||
|
|
||||||
$this->restore_db();
|
$this->restore_db();
|
||||||
|
|
||||||
return lang('Configuration changed.');
|
return lang('Configuration changed.');
|
||||||
|
Loading…
Reference in New Issue
Block a user