summaryrefslogtreecommitdiff
path: root/app/Controller/Search.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/Search.php')
-rw-r--r--app/Controller/Search.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controller/Search.php b/app/Controller/Search.php
index 9b9b9e65..840a90c8 100644
--- a/app/Controller/Search.php
+++ b/app/Controller/Search.php
@@ -2,6 +2,8 @@
namespace Kanboard\Controller;
+use Kanboard\Filter\TaskProjectsFilter;
+
/**
* Search controller
*
@@ -23,14 +25,12 @@ class Search extends Base
->setDirection('DESC');
if ($search !== '' && ! empty($projects)) {
- $query = $this
- ->taskFilter
- ->search($search)
- ->filterByProjects(array_keys($projects))
- ->getQuery();
-
$paginator
- ->setQuery($query)
+ ->setQuery($this->taskLexer
+ ->build($search)
+ ->withFilter(new TaskProjectsFilter(array_keys($projects)))
+ ->getQuery()
+ )
->calculate();
$nb_tasks = $paginator->getTotal();