]> git.wh0rd.org Git - tt-rss.git/commitdiff
Fix automatic language detection for registered users
authorLuc Didry <luc@didry.org>
Thu, 6 Jun 2013 18:54:47 +0000 (21:54 +0300)
committerLuc Didry <luc@didry.org>
Thu, 6 Jun 2013 18:54:47 +0000 (21:54 +0300)
If you do not choose a language, the db pref record for your language is an empty string, but if you choose "automatic detection" and save your prefs, it's "auto".
"auto" in startup_gettext function prevents ttrss to choose the appropriate language.

include/functions.php

index 77725fa981dbc1d266ba05b8234a37a392cdeda0..2f288737ed4b6814ead1331889807107deccacfb 100644 (file)
                if ($_SESSION["uid"] && get_schema_version() >= 120) {
                        $pref_lang = get_pref("USER_LANGUAGE", $_SESSION["uid"]);
 
-                       if ($pref_lang) {
+                       if ($pref_lang && $pref_lang != 'auto') {
                                $lang = $pref_lang;
                        }
                }