summaryrefslogtreecommitdiff
path: root/models/board.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-26 20:04:39 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-26 20:04:39 -0400
commit6551609d1b248011d301080c1be7c48085dc5d55 (patch)
tree0b09326b95232338f9f61dfe6268ced206e5b78b /models/board.php
parent3332949c8baae581ea70ce5c61bb2a6225100422 (diff)
Add a filter by user and due date + minor changes
Diffstat (limited to 'models/board.php')
-rw-r--r--models/board.php8
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);