]> git.wh0rd.org Git - tt-rss.git/commitdiff
only get USER_LANGUAGE on schema 120 and up
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 30 Apr 2013 05:34:24 +0000 (09:34 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 30 Apr 2013 05:34:24 +0000 (09:34 +0400)
classes/handler/public.php
include/functions.php

index 2b5169ca7f6d8d6094648d3c9493f77704e04c71..d5933a18c01ee0b24ad010e48f1ea9a25e373a9d 100644 (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"];
 
index b3130104b138b8aa525375beabb3c2377ab6be04..c39b4938c4d1d1cc42e7b3ca144001bf77e54f80 100644 (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;