From e4e4aa97bc6572a14e519bf9311cfa5c248a22f7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 13 May 2014 09:32:21 +0000 Subject: [PATCH] flushing instance cache and config cache, after saving minimal config, fixing default_records of apps use not up to date data --- phpgwapi/inc/class.config.inc.php | 14 ++++++-------- setup/inc/class.setup_process.inc.php | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/phpgwapi/inc/class.config.inc.php b/phpgwapi/inc/class.config.inc.php index 9910c58858..fa113a48da 100755 --- a/phpgwapi/inc/class.config.inc.php +++ b/phpgwapi/inc/class.config.inc.php @@ -253,7 +253,7 @@ class config */ private static function _check_private_cf($private) { - static $user_and_memberships; + static $user_and_memberships = null; if (!$private) { @@ -282,7 +282,7 @@ class config $changed = 0; if (($cfs = self::get_customfields($app, true))) { - foreach($cfs as $name => &$data) + foreach($cfs as &$data) { if ($data['private']) { @@ -353,7 +353,7 @@ class config 'phpgwapi' => array('webserver_url','server_timezone','enforce_ssl','system_charset', 'checkfornewversion','checkappversions','email_address_format', // admin >> site config 'site_title','login_logo_file','login_logo_url','login_logo_title','favicon_file', - 'markuntranslated','link_list_thumbnail','enabled_spellcheck', + 'markuntranslated','link_list_thumbnail','enabled_spellcheck','debug_minify', 'call_link','call_popup', // addressbook 'hide_birthdays'), // calendar 'projectmanager' => array('hours_per_workday', 'duration_units'), @@ -385,13 +385,11 @@ class config } /** - * Initialise our db - * - * We use a reference here (no clone), as we no longer use egw_db::row() or egw_db::next_record()! - * + * Initialise class: reference to db and self::$configs cache */ - private static function init_static() + 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)) { config::$db = $GLOBALS['egw']->db; diff --git a/setup/inc/class.setup_process.inc.php b/setup/inc/class.setup_process.inc.php index 2377da7dfd..ca35d86787 100755 --- a/setup/inc/class.setup_process.inc.php +++ b/setup/inc/class.setup_process.inc.php @@ -297,6 +297,8 @@ 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 + config::init_static(); // flush internal cache of config class $GLOBALS['egw_setup']->setup_account_object($current_config); }