diff options
author | Simon Rettberg | 2019-10-31 12:21:35 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-10-31 12:21:35 +0100 |
commit | 8c18415ccb3d32db6e89ea00275425cc69793908 (patch) | |
tree | affbf6750781f2ffdf1409bf150349d3c4bb7204 /inc/dictionary.inc.php | |
parent | [baseconfig] Improved verbose output of plain config (diff) | |
download | slx-admin-8c18415ccb3d32db6e89ea00275425cc69793908.tar.gz slx-admin-8c18415ccb3d32db6e89ea00275425cc69793908.tar.xz slx-admin-8c18415ccb3d32db6e89ea00275425cc69793908.zip |
[inc/Util] Add method to agressively unset a cookie
This tries to work around problems with the cookie path
and trailing slashes.
Diffstat (limited to 'inc/dictionary.inc.php')
-rw-r--r-- | inc/dictionary.inc.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php index 935d1f4e..b69007a6 100644 --- a/inc/dictionary.inc.php +++ b/inc/dictionary.inc.php @@ -28,7 +28,8 @@ class Dictionary //Changes the language in case there is a request to $lang = Request::get('lang'); if ($lang !== false && in_array($lang, self::$languages)) { - setcookie('lang', $lang, time() + 60 * 60 * 24 * 30 * 12); + Util::clearCookie('lang'); + setcookie('lang', $lang, time() + 86400 * 30 * 12); $url = Request::get('url'); if ($url === false && isset($_SERVER['HTTP_REFERER'])) { $url = $_SERVER['HTTP_REFERER']; |