diff options
author | Andrew Dolgov <[email protected]> | 2013-04-27 17:12:48 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-27 17:12:48 +0400 |
commit | 1ee4900a54b9aba69d115a5f4a513fef31655452 (patch) | |
tree | 705de62e82626c42f8edf14fa9ac85a0432ae9ab /include/functions.php | |
parent | efe46a3b535da9c1c9839cac2b3351349fa42d73 (diff) |
fix startup_gettext() trying to get configured language before session is initialized
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index 6337dbbde..5da657f2d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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) { |