From 53e1f3a96ee04394c57ec12b7276d3102da6e521 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 16 Nov 2010 09:34:47 +0000 Subject: [PATCH] no need to invalidate session cache, if we write the prefs to the session too --- phpgwapi/inc/class.preferences.inc.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index f33a026c44..d136efe174 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -661,13 +661,13 @@ class preferences } /** - * save the the preferences to the repository + * Save the the preferences to the repository * * User prefs for saveing are in $this->user not in $this->data, which are the effectiv prefs only! * - * @param boolean $update_session_info=false old param, seems not to be used + * @param boolean $update_session_info=false old param, seems not to be used (not used anymore) * @param string $type='user' which prefs to update: user/default/forced - * @param boolean $invalid_cache=true should we invalidate the cache, default true + * @param boolean $invalid_cache=true should we invalidate the cache, default true (not used anymore) * @return array with new effective prefs (even when forced or default prefs are deleted!) */ function save_repository($update_session_info = False,$type='user',$invalid_cache=true) @@ -715,15 +715,10 @@ class preferences } $this->db->transaction_commit(); - if ($invalid_cache && method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited - { - $GLOBALS['egw']->invalidate_session_cache(); // in case with cache the egw_info array in the session - } - } - else - { - $_SESSION[egw_session::EGW_INFO_CACHE]['user']['preferences'] = $GLOBALS['egw_info']['user']['preferences'] = $this->data; + // no need to invalidate session cache, if we write the prefs to the session too } + $_SESSION[egw_session::EGW_INFO_CACHE]['user']['preferences'] = $GLOBALS['egw_info']['user']['preferences'] = $this->data; + return $this->data; }