Add support for reference:none

This commit is contained in:
Frédéric Guillot
2019-07-17 14:45:09 -07:00
parent ff53a6aa6b
commit 051c36f597
2 changed files with 27 additions and 0 deletions

View File

@@ -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;