fix startup_gettext() trying to get configured language before session is initialized

This commit is contained in:
Andrew Dolgov 2013-04-27 17:12:48 +04:00
parent efe46a3b53
commit 1ee4900a54
1 changed files with 5 additions and 2 deletions

View File

@ -95,8 +95,11 @@
$lang = _TRANSLATION_OVERRIDE_DEFAULT;
}
if ($_SESSION["language"] && $_SESSION["language"] != "auto") {
$lang = $_SESSION["language"];
// startup_gettext() is called before session_start() so we can't rely
// on $_SESSION['language'] here.
if ($_COOKIE["ttrss_lang"] && $_COOKIE["ttrss_lang"] != "auto") {
$lang = $_COOKIE["ttrss_lang"];
}
if ($lang) {