summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.php7
-rw-r--r--login_form.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index 416cf3332..bb8b7ea2f 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 b12c7b89e..f6ed750ec 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, <?php print SESSION_COOKIE_LIFETIME ?>);
window.location.reload();
}
</script>