]> git.wh0rd.org Git - tt-rss.git/commitdiff
bump language cookie in login_sequence
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 11 Aug 2007 16:03:31 +0000 (17:03 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 11 Aug 2007 16:03:31 +0000 (17:03 +0100)
functions.php
login_form.php

index 416cf33327db9aeb2ca665287cc90579d7ca259b..bb8b7ea2f655ae5e307e043fcb91b50488369049 100644 (file)
@@ -10,7 +10,7 @@
 
        function get_translations() {
                $tr = array(
-                                       ""      => "Detect automatically",
+                                       "auto"  => "Detect automatically",
                                        "en_US" => "English",
                                        "fr_FR" => "Français",
                                        "ru_RU" => "Русский",
                                /* 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 {
index b12c7b89e5c122bdb3ed239b7e7aa62515f54529..f6ed750ec2e82268dacaf7657f8453fbc65c91ab 100644 (file)
@@ -25,7 +25,7 @@ function init() {
 }
 function languageChange(elem) {
        var lang = elem[elem.selectedIndex].value;
-       setCookie("ttrss_lang", lang);
+       setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
        window.location.reload();
 }
 </script>