summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2019-07-17 14:45:09 -0700
committerFrédéric Guillot <fred@kanboard.net>2019-07-17 15:27:12 -0700
commit051c36f597fddb791ac156aa27f995248f0d2c0a (patch)
tree9f4568c26c7b4ce1b1f0edf266ba7be5d95c5427 /app
parentff53a6aa6bd31bdb8fbdeef4865507ae502ea386 (diff)
Add support for reference:none
Diffstat (limited to 'app')
-rw-r--r--app/Filter/TaskReferenceFilter.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Filter/TaskReferenceFilter.php b/app/Filter/TaskReferenceFilter.php
index 2fe6f8a6..612be812 100644
--- a/app/Filter/TaskReferenceFilter.php
+++ b/app/Filter/TaskReferenceFilter.php
@@ -32,6 +32,14 @@ class TaskReferenceFilter extends BaseFilter implements FilterInterface
*/
public function apply()
{
+ if ($this->value === 'none') {
+ $this->query->beginOr();
+ $this->query->eq(TaskModel::TABLE.'.reference', '');
+ $this->query->isNull(TaskModel::TABLE.'.reference');
+ $this->query->closeOr();
+ return $this;
+ }
+
if (strpos($this->value, '*') >= 0) {
$this->query->ilike(TaskModel::TABLE.'.reference', str_replace('*', '%', $this->value));
return $this;