From: Andrew Dolgov Date: Tue, 30 Apr 2013 05:34:24 +0000 (+0400) Subject: only get USER_LANGUAGE on schema 120 and up X-Git-Tag: 1.7.9~25^2~54 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b18d109f22975e9313b7064d86417e213804ee80;p=tt-rss.git only get USER_LANGUAGE on schema 120 and up --- diff --git a/classes/handler/public.php b/classes/handler/public.php index 2b5169ca..d5933a18 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -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"]; diff --git a/include/functions.php b/include/functions.php index b3130104..c39b4938 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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;