From 84f950ef7e9fecc2a9c26ea73a47880b221c26b9 Mon Sep 17 00:00:00 2001 From: "guotao@cnezsoft.com" Date: Tue, 8 Mar 2011 05:33:17 +0000 Subject: [PATCH] * bug #181 --- module/user/model.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/user/model.php b/module/user/model.php index 52439e7bc1..0de297e6b1 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -381,6 +381,13 @@ class userModel extends model */ public function getBugs($account) { - return $this->dao->findByAssignedTo($account)->from(TABLE_BUG)->andWhere('deleted')->eq(0)->fetchAll(); + return $this->dao->select('*') + ->from(TABLE_BUG)->alias('t1') + ->leftJoin(TABLE_PRODUCT)->alias('t2') + ->on('t1.product = t2.id') + ->where('t2.deleted')->eq(0) + ->andwhere('t1.deleted')->eq(0) + ->andwhere('t1.assignedTo')->eq($account) + ->fetchAll(); } }