fix no translations loaded, by keeping just that pref in the session, as it is used before rest of prefs get restored

This commit is contained in:
Ralf Becker 2017-04-05 09:55:54 +02:00
parent cb22983fad
commit 0eaae4b4e4
2 changed files with 7 additions and 4 deletions

View File

@ -959,9 +959,6 @@ class Session
}
else
{
// set prefs, they are no longer stored in session
$GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository();
// restore apps to $GLOBALS['egw_info']['apps']
$GLOBALS['egw']->applications->read_installed_apps();
@ -970,6 +967,9 @@ class Session
{
$GLOBALS['egw_info']['user']['apps'] = array_intersect_key($GLOBALS['egw_info']['apps'], array_flip($GLOBALS['egw_info']['user']['apps']));
}
// set prefs, they are no longer stored in session
$GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository();
}
if ($GLOBALS['egw']->accounts->is_expired($GLOBALS['egw_info']['user']))

View File

@ -135,7 +135,10 @@ if ($GLOBALS['egw_info']['flags']['currentapp'] != 'login')
unset($_SESSION[Session::EGW_INFO_CACHE]['flags']); // dont save the flags, they change on each request
// dont save preferences, as Session::verify restores them from instance cache anyway
unset($_SESSION[Session::EGW_INFO_CACHE]['user']['preferences']);
$_SESSION[Session::EGW_INFO_CACHE]['user']['preferences'] = array(
// we need user language as it is used before preferences get restored!
'common' => array('lang' => $GLOBALS['egw_info']['user']['preferences']['common']['lang']),
);
// dont save apps, as Session::verify restores them from instance cache anyway
unset($_SESSION[Session::EGW_INFO_CACHE]['apps']);