mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Update cookie for language setting when editing user information
Currently, when a user edits their language setting from the edit user form, the changes aren't reflected until the user either lets the original cookie expire, deletes the cookie manually, or changes the language a second time via the dropdown menu on the top of the page. This patch makes the language cookie get updated when it is changed from the edit user form. Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
608c483090
commit
7ff5070190
1 changed files with 7 additions and 0 deletions
|
@ -376,6 +376,13 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
|
|||
setcookie("AURTZ", $TZ, $cookie_time, "/");
|
||||
}
|
||||
|
||||
if (isset($_COOKIE["AURLANG"]) && ($_COOKIE["AURLANG"] != $L)) {
|
||||
/* set new cookie for language */
|
||||
$timeout = intval(config_get("options", "persistent_cookie_timeout"));
|
||||
$cookie_time = time() + $timeout;
|
||||
setcookie("AURLANG", $L, $cookie_time, "/");
|
||||
}
|
||||
|
||||
if ($result === false || $ssh_key_result === false) {
|
||||
$message = __("No changes were made to the account, %s%s%s.",
|
||||
"<strong>", htmlspecialchars($U,ENT_QUOTES), "</strong>");
|
||||
|
|
Loading…
Add table
Reference in a new issue