From 50aff9cfb64e592e42d818b8d3ae09654da64307 Mon Sep 17 00:00:00 2001 From: Sobuno Date: Fri, 3 Jan 2025 00:13:51 +0100 Subject: [PATCH] Make prohibited word search work --- app/Support/Search/OperatorQuerySearch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php index e37b90e282..2bdbe40c5b 100644 --- a/app/Support/Search/OperatorQuerySearch.php +++ b/app/Support/Search/OperatorQuerySearch.php @@ -2774,7 +2774,7 @@ class OperatorQuerySearch implements SearchInterface public function searchTransactions(): LengthAwarePaginator { $this->parseTagInstructions(); - if (0 === count($this->getWords()) && 0 === count($this->getOperators())) { + if (0 === count($this->getWords()) && 0 === count($this->getExcludedWords()) && 0 === count($this->getOperators())) { return new LengthAwarePaginator([], 0, 5, 1); } @@ -2831,6 +2831,11 @@ class OperatorQuerySearch implements SearchInterface return $this->words; } + public function getExcludedWords(): array + { + return $this->prohibitedWords; + } + public function setDate(Carbon $date): void { $this->date = $date;