only get USER_LANGUAGE on schema 120 and up

This commit is contained in:
Andrew Dolgov 2013-04-30 09:34:24 +04:00
parent d332117058
commit b18d109f22
2 changed files with 6 additions and 3 deletions

View File

@ -510,7 +510,10 @@ class Handler_Public extends Handler {
if (authenticate_user($login, $password)) {
$_POST["password"] = "";
$_SESSION["language"] = get_pref("USER_LANGUAGE", $_SESSION["uid"], false);
if (get_schema_version() >= 120) {
$_SESSION["language"] = get_pref("USER_LANGUAGE", $_SESSION["uid"]);
}
$_SESSION["ref_schema_version"] = get_schema_version(true);
$_SESSION["bw_limit"] = !!$_POST["bw_limit"];

View File

@ -97,8 +97,8 @@
$lang = _TRANSLATION_OVERRIDE_DEFAULT;
}
if ($_SESSION["uid"]) {
$pref_lang = get_pref("USER_LANGUAGE", $_SESSION["uid"], false);
if ($_SESSION["uid"] && get_schema_version() >= 120) {
$pref_lang = get_pref("USER_LANGUAGE", $_SESSION["uid"]);
if ($pref_lang) {
$lang = $pref_lang;