diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index b699df4c44..a81cbaa989 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -468,7 +468,7 @@ abstract class bo_tracking if (is_numeric($user_or_lang)) // user --> read everything from his prefs { $GLOBALS['egw']->preferences->__construct($user_or_lang); - $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository(); + $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository(false); // no session prefs! if ($check && $this->check2pref) $check = $this->check2pref[$check]; if ($check && !$GLOBALS['egw_info']['user']['preferences'][$this->app][$check]) @@ -490,7 +490,7 @@ abstract class bo_tracking $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->default; $GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $user_or_lang; } - if ($lang != translation::$userlang) // load the right language if needed + if ($GLOBALS['egw_info']['user']['preferences']['common']['lang'] != translation::$userlang) // load the right language if needed { translation::init(); } diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 8a00ad2ee6..020040c368 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -274,12 +274,12 @@ class preferences * * the function ready all 3 prefs user/default/forced and merges them to the effective ones * - * @internal private function should only be called from within this class + * @param boolean $use_session=true should the session prefs get used (default true) or not (false) * @return array with effective prefs ($this->data) */ - function read_repository() + function read_repository($use_session=true) { - $this->session = $GLOBALS['egw']->session->appsession('preferences','preferences'); + $this->session = $use_session ? $GLOBALS['egw']->session->appsession('preferences','preferences') : array(); if (!is_array($this->session)) { $this->session = array(); diff --git a/phpgwapi/inc/class.translation.inc.php b/phpgwapi/inc/class.translation.inc.php index 7235416761..22cbc87f2b 100644 --- a/phpgwapi/inc/class.translation.inc.php +++ b/phpgwapi/inc/class.translation.inc.php @@ -173,6 +173,7 @@ class translation if ($load_translations) { + self::$lang_arr = self::$loaded_apps = array(); if ($GLOBALS['egw_info']['user']['preferences']['common']['lang']) { self::$userlang = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];