* Fix bug for task#4806.

This commit is contained in:
滔哥
2018-09-15 22:48:15 +08:00
parent ecf8935ccf
commit 500f39e290
2 changed files with 4 additions and 7 deletions
+1 -5
View File
@@ -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')
+3 -2
View File
@@ -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');