Remove GET parametr from URL after language change
This commit is contained in:
parent
b6eeb5d190
commit
6d0a74e717
|
@ -8,6 +8,8 @@ if (isset($_GET['lang'])) {
|
||||||
$_SESSION['lang'] = $langcode;
|
$_SESSION['lang'] = $langcode;
|
||||||
|
|
||||||
setcookie('lang', $langcode, time() + (3600 * 24 * 60));
|
setcookie('lang', $langcode, time() + (3600 * 24 * 60));
|
||||||
|
|
||||||
|
header("Location: {$_SERVER['PHP_SELF']}");
|
||||||
} else if (isset($_SESSION['lang'])) {
|
} else if (isset($_SESSION['lang'])) {
|
||||||
$langcode = $_SESSION['lang'];
|
$langcode = $_SESSION['lang'];
|
||||||
} else if (isset($_COOKIE['lang'])) {
|
} else if (isset($_COOKIE['lang'])) {
|
||||||
|
|
Loading…
Reference in New Issue