From 57d0c4c6f5f637f395ea2ca5aa5b1fd53be99956 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 16 Sep 2012 06:08:00 -0700 Subject: [PATCH] Fix switching language in compiled version --- adminer/include/lang.inc.php | 1 + compile.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/include/lang.inc.php b/adminer/include/lang.inc.php index 41132e75..c3ac8a72 100644 --- a/adminer/include/lang.inc.php +++ b/adminer/include/lang.inc.php @@ -81,6 +81,7 @@ function switch_lang() { if (isset($_POST["lang"]) && $_SESSION["token"] == $_POST["token"]) { // $token and $error not yet available cookie("adminer_lang", $_POST["lang"]); $_SESSION["lang"] = $_POST["lang"]; // cookies may be disabled + $_SESSION["translations"] = array(); // used in compiled version redirect(remove_from_uri()); } diff --git a/compile.php b/compile.php index 0f2d7ad8..f727d5bf 100755 --- a/compile.php +++ b/compile.php @@ -119,7 +119,7 @@ if ($_SESSION["translations_version"] != ' . $translations_version . ') { $translations = array(); $_SESSION["translations_version"] = ' . $translations_version . '; } -if ($_GET["lang"] || !$translations) { +if (!$translations) { switch ($LANG) {' . $return . ' } $translations = array(); -- 2.39.5