+ code for task #612, but not finished.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-12-22 01:54:20 +00:00
parent 5c52685cab
commit 8c303b7a5c
6 changed files with 143 additions and 16 deletions
+3 -4
View File
@@ -124,15 +124,14 @@ class bugModel extends model
* @access public
* @return array
*/
public function getActiveBugs($pager, $projectID)
public function getActiveBugs($pager, $projectID, $products)
{
$products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs();
if(!$products) return array();
return $this->dao->select('*')->from(TABLE_BUG)
->where('status')->eq('active')
->andWhere('toTask')->eq(0)
->andWhere('tostory')->eq(0)
->andWhere('product')->in($products)
->beginIF(!empty($products))->andWhere('product')->in($products)
->beginIF(empty($products))->andWhere('project')->eq($projectID)
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->page($pager)