mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix search result page.
This commit is contained in:
parent
73104aae1f
commit
b6960dc299
@ -375,8 +375,10 @@ class GroupCollector implements GroupCollectorInterface
|
||||
public function excludeSearchWords(array $array): GroupCollectorInterface
|
||||
{
|
||||
if (0 === count($array)) {
|
||||
Log::debug('No excluded search words provided, skipping.');
|
||||
return $this;
|
||||
}
|
||||
Log::debug(sprintf('%d excluded search words provided.', count($array)));
|
||||
$this->query->where(
|
||||
static function (EloquentBuilder $q) use ($array): void {
|
||||
$q->where(
|
||||
@ -949,8 +951,10 @@ class GroupCollector implements GroupCollectorInterface
|
||||
public function setSearchWords(array $array): GroupCollectorInterface
|
||||
{
|
||||
if (0 === count($array)) {
|
||||
Log::debug('No words in array');
|
||||
return $this;
|
||||
}
|
||||
Log::debug(sprintf('%d word(s) in array', count($array)));
|
||||
$this->query->where(
|
||||
static function (EloquentBuilder $q) use ($array): void {
|
||||
$q->where(
|
||||
|
@ -146,7 +146,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
*/
|
||||
public function parseQuery(string $query): void
|
||||
{
|
||||
app('log')->debug(sprintf('Now in parseQuery(%s)', $query));
|
||||
app('log')->debug(sprintf('Now in parseQuery("%s")', $query));
|
||||
/** @var QueryParserInterface $parser */
|
||||
$parser = app(QueryParserInterface::class);
|
||||
app('log')->debug(sprintf('Using %s as implementation for QueryParserInterface', get_class($parser)));
|
||||
|
@ -35,6 +35,7 @@
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="APP_LOG_ENV" value="notice"/>
|
||||
<env name="QUERY_PARSER_IMPLEMENTATION" value="new"/>
|
||||
<ini name="xdebug.mode" value="coverage"/>
|
||||
</php>
|
||||
<testsuites>
|
||||
|
@ -83,7 +83,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if query|length > 0 or excludedWords|length > 0 or operators|length > 0 %}
|
||||
{% if query|length > 0 or words|length > 0 or excludedWords|length > 0 or operators|length > 0 %}
|
||||
<div class="row result_row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box search_box">
|
||||
@ -138,7 +138,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if query|length == 0 and excludedWords|length == 0 and operators|length == 0 %}
|
||||
{% if query|length == 0 and excludedWords|length == 0 and words|length == 0 and operators|length == 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
|
Loading…
Reference in New Issue
Block a user