From 64d2c52160ccb5bf66b1fa4d4051cdf142c3ae8c Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Mon, 2 Mar 2020 17:54:29 +0900 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E7=94=A8DB=E3=81=A7=E5=A4=9A?= =?UTF-8?q?=E8=A8=80=E8=AA=9E=E6=99=82=E3=80=81=E3=83=95=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=83=A0=E3=81=A7=E6=97=A5=E8=8B=B1=E3=81=A9=E3=81=A1=E3=82=89?= =?UTF-8?q?=E3=82=82=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=82=82=E3=80=81=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=A7?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E3=81=97=E3=81=9F=E8=A8=98=E4=BA=8B=E3=81=AF?= =?UTF-8?q?=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=A7=E3=81=97=E3=81=8B=E8=A6=8B?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E3=81=AE=E3=81=A7=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/MultidatabaseContent.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Model/MultidatabaseContent.php b/Model/MultidatabaseContent.php index e45d7f0..ba40830 100644 --- a/Model/MultidatabaseContent.php +++ b/Model/MultidatabaseContent.php @@ -325,6 +325,17 @@ public function getConditions($blockId, $permissions) { $conditions = $this->getWorkflowConditions($conditions); + // bugfix: 汎用DBで多言語時、フレームで日英どちらも表示するにしても、日本語で登録した記事は日本語でしか見れないので対応 + // https://github.com/NetCommons3/NetCommons3/issues/1557 + // var_dump($conditions); + // array(3) { [0]=> array(1) { ["MultidatabaseContent.language_id"]=> string(1) "2" } [1]=> array(1) { ["OR"]=> array(2) { [0]=> array(0) { } [1]=> array(1) { ["MultidatabaseContent.is_latest"]=> bool(true) } } } ["MultidatabaseContent.block_Id"]=> string(3) "226" } + foreach ($conditions as $key => $condition) { + if (array_key_exists('MultidatabaseContent.language_id', $condition)) { + unset($conditions[$key]); + break; + } + } + return $conditions; }