mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Extra debug in search.
This commit is contained in:
parent
e3efb23b78
commit
80384000c1
@ -179,7 +179,7 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
public function searchTransactions(): LengthAwarePaginator
|
public function searchTransactions(): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
if (0 === count($this->getWords()) && 0 === count($this->getOperators())) {
|
if (0 === count($this->getWords()) && 0 === count($this->getOperators())) {
|
||||||
return new LengthAwarePaginator([],0,5,1);
|
return new LengthAwarePaginator([], 0, 5, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->collector->getPaginatedGroups();
|
return $this->collector->getPaginatedGroups();
|
||||||
@ -259,11 +259,12 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
case Emoticon::class:
|
case Emoticon::class:
|
||||||
case Emoji::class:
|
case Emoji::class:
|
||||||
case Mention::class:
|
case Mention::class:
|
||||||
Log::debug(sprintf('Now handle %s', $class));
|
$words = (string)$searchNode->getValue();
|
||||||
$this->words[] = (string)$searchNode->getValue();
|
Log::debug(sprintf('Add words "%s" to search string, because Node class is "%s"', $words, $class));
|
||||||
|
$this->words[] = $words;
|
||||||
break;
|
break;
|
||||||
case Field::class:
|
case Field::class:
|
||||||
Log::debug(sprintf('Now handle %s', $class));
|
Log::debug(sprintf('Now handle Node class %s', $class));
|
||||||
/** @var Field $searchNode */
|
/** @var Field $searchNode */
|
||||||
// used to search for x:y
|
// used to search for x:y
|
||||||
$operator = strtolower($searchNode->getValue());
|
$operator = strtolower($searchNode->getValue());
|
||||||
@ -545,9 +546,9 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
$this->collector->amountLess($amount);
|
$this->collector->amountLess($amount);
|
||||||
break;
|
break;
|
||||||
case 'amount_more':
|
case 'amount_more':
|
||||||
|
Log::debug(sprintf('Now handling operator "%s"', $operator));
|
||||||
// strip comma's, make dots.
|
// strip comma's, make dots.
|
||||||
$value = str_replace(',', '.', (string)$value);
|
$value = str_replace(',', '.', (string)$value);
|
||||||
|
|
||||||
$amount = app('steam')->positive($value);
|
$amount = app('steam')->positive($value);
|
||||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||||
$this->collector->amountMore($amount);
|
$this->collector->amountMore($amount);
|
||||||
|
Loading…
Reference in New Issue
Block a user