summaryrefslogtreecommitdiff
path: root/models/task.php
diff options
context:
space:
mode:
Diffstat (limited to 'models/task.php')
-rw-r--r--models/task.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/models/task.php b/models/task.php
index b61fb13f..bef92f20 100644
--- a/models/task.php
+++ b/models/task.php
@@ -152,8 +152,21 @@ class Task extends Base
)
->join('users', 'id', 'owner_id');
- foreach ($filters as $filter) {
- $table->$filter['operator']($filter['column'], $filter['value']);
+ foreach ($filters as $key => $filter) {
+
+ if ($key === 'or') {
+
+ $table->beginOr();
+
+ foreach ($filter as $subfilter) {
+ $table->$subfilter['operator']($subfilter['column'], $subfilter['value']);
+ }
+
+ $table->closeOr();
+ }
+ else if (isset($filter['operator']) && isset($filter['column']) && isset($filter['value'])) {
+ $table->$filter['operator']($filter['column'], $filter['value']);
+ }
}
if (empty($sorting)) {