From 966443e60dd306f2d0c104d774721b557cdbcc72 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 14 Sep 2018 17:31:43 +0900
Subject: [PATCH 01/25] =?UTF-8?q?=E8=A8=80=E8=AA=9E=E5=88=87=E3=82=8A?=
=?UTF-8?q?=E6=9B=BF=E3=81=88=E3=81=A7=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=8C?=
=?UTF-8?q?=E3=83=91=E3=83=A9=E3=83=A1=E3=83=BC=E3=82=BF=E3=81=AB=E5=85=A5?=
=?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B=E3=81=A8Notice=E3=81=8C?=
=?UTF-8?q?=E3=81=A7=E3=82=8B=20https://github.com/NetCommons3/NetCommons3?=
=?UTF-8?q?/issues/1341?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/Elements/switch_language_form.ctp | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/View/Elements/switch_language_form.ctp b/View/Elements/switch_language_form.ctp
index c4f9d04..26ea706 100644
--- a/View/Elements/switch_language_form.ctp
+++ b/View/Elements/switch_language_form.ctp
@@ -16,14 +16,7 @@ $enable = array_flip(
Hash::extract($switchLanguages, '{n}.Language.code')
);
$options = $this->M17n->getLanguagesOptions($enable);
-$langQuery = parse_url($this->request->header('REQUEST_URI'), PHP_URL_QUERY);
-if (preg_match('/lang=[^&]*/i', $langQuery)) {
- $langQuery = preg_replace('/lang=[^&]*/i', 'lang=%s', $langQuery);
-} elseif ($langQuery) {
- $langQuery .= '&lang=%s';
-} else {
- $langQuery = 'lang=%s';
-}
+$langCommonQuery = parse_url($this->request->header('REQUEST_URI'), PHP_URL_QUERY);
?>
@@ -32,7 +25,17 @@ if (preg_match('/lang=[^&]*/i', $langQuery)) {