diff options
author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-26 20:04:39 -0400 |
---|---|---|
committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-26 20:04:39 -0400 |
commit | 6551609d1b248011d301080c1be7c48085dc5d55 (patch) | |
tree | 0b09326b95232338f9f61dfe6268ced206e5b78b /models/board.php | |
parent | 3332949c8baae581ea70ce5c61bb2a6225100422 (diff) |
Add a filter by user and due date + minor changes
Diffstat (limited to 'models/board.php')
-rw-r--r-- | models/board.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/models/board.php b/models/board.php index af1f4f7a..01c3e832 100644 --- a/models/board.php +++ b/models/board.php @@ -176,16 +176,14 @@ class Board extends Base * @param integer $project_id Project id * @return array */ - public function get($project_id) + public function get($project_id, array $filters = array()) { $this->db->startTransaction(); $columns = $this->getColumns($project_id); - $filters = array( - array('column' => 'project_id', 'operator' => 'eq', 'value' => $project_id), - array('column' => 'is_active', 'operator' => 'eq', 'value' => Task::STATUS_OPEN), - ); + $filters[] = array('column' => 'project_id', 'operator' => 'eq', 'value' => $project_id); + $filters[] = array('column' => 'is_active', 'operator' => 'eq', 'value' => Task::STATUS_OPEN); $taskModel = new Task($this->db, $this->event); $tasks = $taskModel->find($filters); |