From 87c134322dd0c8789237087c037d3fb22e2f6059 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Aug 2020 17:17:09 +0200 Subject: [PATCH] Fix #3673 --- app/Http/Controllers/SearchController.php | 1 - app/Support/Search/Search.php | 12 +----------- app/Support/Search/SearchInterface.php | 5 ----- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 992579db8a..d7983a5c71 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -88,7 +88,6 @@ class SearchController extends Controller $searcher->parseQuery($fullQuery); $searcher->setPage($page); - $searcher->setLimit((int) config('firefly.search_result_limit')); $groups = $searcher->searchTransactions(); $hasPages = $groups->hasPages(); $searchTime = round($searcher->searchTime(), 3); // in seconds diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php index db36e97cbe..69dcaf5174 100644 --- a/app/Support/Search/Search.php +++ b/app/Support/Search/Search.php @@ -48,8 +48,6 @@ class Search implements SearchInterface private $budgetRepository; /** @var CategoryRepositoryInterface */ private $categoryRepository; - /** @var int */ - private $limit = 100; /** @var Collection */ private $modifiers; /** @var string */ @@ -156,7 +154,7 @@ class Search implements SearchInterface public function searchTransactions(): LengthAwarePaginator { Log::debug('Start of searchTransactions()'); - $pageSize = 50; + $pageSize = (int) config('firefly.search_result_limit'); /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); @@ -172,14 +170,6 @@ class Search implements SearchInterface } - /** - * @param int $limit - */ - public function setLimit(int $limit): void - { - $this->limit = $limit; - } - /** * @param User $user */ diff --git a/app/Support/Search/SearchInterface.php b/app/Support/Search/SearchInterface.php index 38db8dc383..5cf427ec02 100644 --- a/app/Support/Search/SearchInterface.php +++ b/app/Support/Search/SearchInterface.php @@ -66,11 +66,6 @@ interface SearchInterface */ public function searchTransactions(): LengthAwarePaginator; - /** - * @param int $limit - */ - public function setLimit(int $limit); - /** * @param User $user */