From: Andrew Dolgov Date: Sat, 11 Aug 2007 16:03:31 +0000 (+0100) Subject: bump language cookie in login_sequence X-Git-Tag: 1.2.14~62 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=019bd5a951f386e55350be22ff2a18dcd60f04ed;p=tt-rss.git bump language cookie in login_sequence --- diff --git a/functions.php b/functions.php index 416cf333..bb8b7ea2 100644 --- a/functions.php +++ b/functions.php @@ -10,7 +10,7 @@ function get_translations() { $tr = array( - "" => "Detect automatically", + "auto" => "Detect automatically", "en_US" => "English", "fr_FR" => "Français", "ru_RU" => "Русский", @@ -1413,6 +1413,11 @@ /* bump login timestamp */ db_query($link, "UPDATE ttrss_users SET last_login = NOW() WHERE id = " . $_SESSION["uid"]); + + if ($_SESSION["language"]) { + setcookie("ttrss_lang", $_SESSION["language"], + time() + SESSION_COOKIE_LIFETIME); + } } } else { diff --git a/login_form.php b/login_form.php index b12c7b89..f6ed750e 100644 --- a/login_form.php +++ b/login_form.php @@ -25,7 +25,7 @@ function init() { } function languageChange(elem) { var lang = elem[elem.selectedIndex].value; - setCookie("ttrss_lang", lang); + setCookie("ttrss_lang", lang, ); window.location.reload(); }