From 8ba856df79ff0069527da583ae37abbaa315a6a0 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 26 Jun 2015 12:22:08 +0930 Subject: [PATCH] Update gambit for search API --- extensions/tags/src/TagGambit.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/tags/src/TagGambit.php b/extensions/tags/src/TagGambit.php index dc22027cf..69e618201 100644 --- a/extensions/tags/src/TagGambit.php +++ b/extensions/tags/src/TagGambit.php @@ -36,13 +36,14 @@ class TagGambit extends GambitAbstract * @param \Flarum\Core\Search\SearcherInterface $searcher * @return void */ - public function conditions($matches, SearcherInterface $searcher) + protected function conditions(SearcherInterface $searcher, array $matches, $negate) { $slugs = explode(',', trim($matches[1], '"')); - $searcher->query()->where(function ($query) use ($slugs) { + // TODO: implement $negate + $searcher->getQuery()->where(function ($query) use ($slugs) { foreach ($slugs as $slug) { - if ($slug === 'uncategorized') { + if ($slug === 'untagged') { $query->orWhereNotExists(function ($query) { $query->select(app('db')->raw(1)) ->from('discussions_tags')