From 47398d1cf04390ae2d0567d9975c4d6c0b0d5109 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 16 Nov 2022 10:52:53 +0800 Subject: [PATCH 1/2] * Fix bug #29869. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index a1f2bee3ed..4201893af4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3081,7 +3081,7 @@ class storyModel extends model } elseif($branch !== 'all' and $queryProductID != 'all') { - if($branch and strpos($storyQuery, '`branch` =') === false) $storyQuery .= " AND `branch` in($branch)"; + if($branch and strpos($storyQuery, '`branch` =') === false) $storyQuery .= " AND `branch` in('$branch')"; } $storyQuery = preg_replace("/`plan` +LIKE +'%([0-9]+)%'/i", "CONCAT(',', `plan`, ',') LIKE '%,$1,%'", $storyQuery); From 3ce0869e1a964ae5da0807af89463c20311b108f Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 16 Nov 2022 11:28:40 +0800 Subject: [PATCH 2/2] * Replace '' to helper::dbIN for release linkStory. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 4201893af4..aef9f5a6f7 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3081,7 +3081,7 @@ class storyModel extends model } elseif($branch !== 'all' and $queryProductID != 'all') { - if($branch and strpos($storyQuery, '`branch` =') === false) $storyQuery .= " AND `branch` in('$branch')"; + if($branch and strpos($storyQuery, '`branch` =') === false) $storyQuery .= " AND `branch` " . helper::dbIN($branch); } $storyQuery = preg_replace("/`plan` +LIKE +'%([0-9]+)%'/i", "CONCAT(',', `plan`, ',') LIKE '%,$1,%'", $storyQuery);