diff --git a/application/models/tables/Requests.php b/application/models/tables/Requests.php index 78baa59a570e6e55b2079f3d73ba9f05c4377cba..649e9f174c574b72c69138659b3ac6a01c95de38 100644 --- a/application/models/tables/Requests.php +++ b/application/models/tables/Requests.php @@ -157,7 +157,10 @@ class Requests extends Nmc_Db_Table $requestIds[] = $row['request']; } - $where = $db->quoteInto('requestId IN (?)', $requestIds); + $where = array(); + $where[] = $db->quoteInto('requestId IN (?)', $requestIds); + $where[] = 'state = "approve"'; + $where = implode(' AND ', $where); return $this->fetchAllSorted($where, self::COMPLETED_REQUESTS_ONLY); }