From 500f39e290a6d1b50175d6600e6cfd17156f2eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Sat, 15 Sep 2018 22:48:15 +0800 Subject: [PATCH] * Fix bug for task#4806. --- module/block/control.php | 6 +----- module/bug/model.php | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index ef9b53c44e..f9d9678996 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1016,11 +1016,7 @@ class block extends control $today = date(DT_DATE1); $yesterday = date(DT_DATE1, strtotime('yesterday')); - $this->app->loadLang('bug'); - $bugs = $this->dao->select('id, assignedTo, resolvedDate, closedDate, status')->from(TABLE_BUG) - ->where('deleted')->eq(0) - ->andWhere('id')->in($bugIDList) - ->fetchAll('id'); + $bugs = $this->loadModel('bug')->getByList($bugIDList, 'id, assignedTo, resolvedDate, closedDate, status'); $confirmedBugs = $this->dao->select('objectID')->from(TABLE_ACTION) ->where('objectType')->eq('bug') ->andWhere('action')->eq('bugconfirmed') diff --git a/module/bug/model.php b/module/bug/model.php index 66e5e62de8..1e79d1ea14 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -477,12 +477,13 @@ class bugModel extends model * Get bug list. * * @param int|array|string $bugIDList + * @param string $fields * @access public * @return array */ - public function getByList($bugIDList = 0) + public function getByList($bugIDList = 0, $fields = '*') { - return $this->dao->select('*')->from(TABLE_BUG) + return $this->dao->select($fields)->from(TABLE_BUG) ->where('deleted')->eq(0) ->beginIF($bugIDList)->andWhere('id')->in($bugIDList)->fi() ->fetchAll('id');