mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
fixed wrong language in notifications
This commit is contained in:
parent
c11a4ef210
commit
6799864392
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user