mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix #2564
This commit is contained in:
@@ -64,12 +64,15 @@ class Search implements SearchInterface
|
||||
private $validModifiers;
|
||||
/** @var array */
|
||||
private $words = [];
|
||||
/** @var int */
|
||||
private $page;
|
||||
|
||||
/**
|
||||
* Search constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->page = 1;
|
||||
$this->modifiers = new Collection;
|
||||
$this->validModifiers = (array)config('firefly.search_modifiers');
|
||||
$this->startTime = microtime(true);
|
||||
@@ -149,12 +152,11 @@ class Search implements SearchInterface
|
||||
{
|
||||
Log::debug('Start of searchTransactions()');
|
||||
$pageSize = 50;
|
||||
$page = 1;
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
$collector->setLimit($pageSize)->setPage($page)->withAccountInformation();
|
||||
$collector->setLimit($pageSize)->setPage($this->page)->withAccountInformation();
|
||||
$collector->withCategoryInformation()->withBudgetInformation();
|
||||
$collector->setSearchWords($this->words);
|
||||
|
||||
@@ -308,4 +310,12 @@ class Search implements SearchInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $page
|
||||
*/
|
||||
public function setPage(int $page): void
|
||||
{
|
||||
$this->page = $page;
|
||||
}
|
||||
}
|
||||
|
@@ -41,6 +41,11 @@ interface SearchInterface
|
||||
*/
|
||||
public function getWordsAsString(): string;
|
||||
|
||||
/**
|
||||
* @param int $page
|
||||
*/
|
||||
public function setPage(int $page): void;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
Reference in New Issue
Block a user