From 496e6fdca43aa65f662e057479a69a460f4b6492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Thu, 21 Dec 2017 15:38:17 +0800 Subject: [PATCH 1/3] * Fix bug. --- module/story/model.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 815bd46bae..41a9fe3583 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2271,8 +2271,10 @@ class storyModel extends model /** * Merge plan title. * - * @param int|array $productID - * @param array $stories + * @param int|array $productID + * @param array $stories + * @param int $branch + * * @access public * @return array */ @@ -2289,10 +2291,7 @@ class storyModel extends model ->where('product')->in($productID) ->andWhere('deleted')->eq(0) ->fetchPairs('id', 'title'); - $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('branch')->in($branch)->fetchGroup('story', 'branch'); - $branch = trim(str_replace(',0,', '', ",$branch,"), ','); - $branch = empty($branch) ? 0 : $branch; foreach($stories as $story) { $story->planTitle = ''; From bb7d362acfe01058bd137ab9ff6417b490a6f117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Thu, 21 Dec 2017 15:41:01 +0800 Subject: [PATCH 2/3] * Format code. --- module/story/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/story/model.php b/module/story/model.php index 41a9fe3583..f877f00b02 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1310,6 +1310,7 @@ class storyModel extends model * Get stories list of a product. * * @param int $productID + * @param int $branch * @param array|string $moduleIdList * @param string $status * @param string $orderBy From 31fb6383b27f9c28673f7cb42cf2cd69aac8fab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Thu, 21 Dec 2017 16:06:13 +0800 Subject: [PATCH 3/3] * Fix bug. --- module/task/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index beff8bd80f..f0450108ab 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1239,7 +1239,7 @@ class taskModel extends model ->page($pager) ->fetchAll('id'); - $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or $type == 'needconfirm' or $type == 'myinvolved') ? false : true); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or in_array($type, array('assignedtome', 'myinvolved', 'needconfirm'))) ? false : true); if(empty($tasks)) return array();