mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
fixed setup uses cached config values for installs with multiple instances
This commit is contained in:
parent
134ef05744
commit
b25724e7ed
@ -390,13 +390,13 @@ class config
|
||||
public static function init_static()
|
||||
{
|
||||
// we use a reference here (no clone), as we no longer use egw_db::row() or egw_db::next_record()!
|
||||
if (is_object($GLOBALS['egw']->db))
|
||||
if (isset($GLOBALS['egw_setup']) && is_a($GLOBALS['egw_setup']->db, 'egw_db'))
|
||||
{
|
||||
config::$db = $GLOBALS['egw']->db;
|
||||
self::$db = $GLOBALS['egw_setup']->db;
|
||||
}
|
||||
else
|
||||
{
|
||||
config::$db = $GLOBALS['egw_setup']->db;
|
||||
self::$db = $GLOBALS['egw']->db;
|
||||
}
|
||||
// if item is not cached or cache is not looking alright --> query config from database
|
||||
if (!(self::$configs = egw_cache::getInstance(__CLASS__, 'configs')) || !is_array(self::$configs['phpgwapi']))
|
||||
|
@ -624,7 +624,7 @@ class egw_cache
|
||||
{
|
||||
static $bases = array();
|
||||
|
||||
if (!isset($bases[$level]))
|
||||
if (!isset($bases[$level]) || $level == self::INSTANCE && $bases[$level] != self::$instance_key)
|
||||
{
|
||||
switch($level)
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ class setup_process
|
||||
case 'new':
|
||||
/* Create tables and insert new records for each app in this list */
|
||||
$passing = $this->current($pass,$DEBUG);
|
||||
$this->save_minimal_config($preset_config);
|
||||
if (isset($pass['phpgwapi'])) $this->save_minimal_config($preset_config);
|
||||
$passing = $this->default_records($passing,$DEBUG);
|
||||
break;
|
||||
case 'upgrade':
|
||||
@ -297,7 +297,7 @@ class setup_process
|
||||
|
||||
// so the default_records use the current data
|
||||
$GLOBALS['egw_info']['server'] = array_merge((array)$GLOBALS['egw_info']['server'], $current_config);
|
||||
egw_cache::generate_instance_key(); // generate instance-key flushes whole instance cache
|
||||
egw_cache::flush(); // flush whole instance cache
|
||||
config::init_static(); // flush internal cache of config class
|
||||
$GLOBALS['egw_setup']->setup_account_object($current_config);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user