From: Luc Didry Date: Thu, 6 Jun 2013 18:54:47 +0000 (+0300) Subject: Fix automatic language detection for registered users X-Git-Tag: 1.8~19^2^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c4db796fc7bdd74b17b52c39ad507c68f5a5a07e;p=tt-rss.git Fix automatic language detection for registered users 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. --- diff --git a/include/functions.php b/include/functions.php index 77725fa9..2f288737 100644 --- a/include/functions.php +++ b/include/functions.php @@ -100,7 +100,7 @@ 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; } }