new param to not invalidate the session-cache

This commit is contained in:
Ralf Becker 2006-06-17 18:37:35 +00:00
parent 07df005b44
commit 0af8df4caa

View File

@ -558,9 +558,10 @@
* *
* @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
* @param string $type='user' which prefs to update: user/default/forced * @param string $type='user' which prefs to update: user/default/forced
* @param boolean $invalid_cache=true should we invalidate the cache, default true
* @return array with new effective prefs (even when forced or default prefs are deleted!) * @return array with new effective prefs (even when forced or default prefs are deleted!)
*/ */
function save_repository($update_session_info = False,$type='user') function save_repository($update_session_info = False,$type='user',$invalid_cache=true)
{ {
switch($type) switch($type)
{ {
@ -606,7 +607,7 @@
$GLOBALS['egw_info']['user']['preferences'] = $this->data; $GLOBALS['egw_info']['user']['preferences'] = $this->data;
$GLOBALS['egw']->session->save_repositories(); $GLOBALS['egw']->session->save_repositories();
} }
if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited 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 $GLOBALS['egw']->invalidate_session_cache(); // in case with cache the egw_info array in the session
} }