This commit is contained in:
James Cole
2020-11-29 07:07:08 +01:00
parent b38e7cbb1a
commit 1ad5f5c759
3 changed files with 2 additions and 11 deletions

View File

@@ -69,7 +69,6 @@ class SearchController extends Controller
$ruleId = (int) $request->get('rule'); $ruleId = (int) $request->get('rule');
$rule = null; $rule = null;
$ruleChanged = false; $ruleChanged = false;
$longQueryWarning = false;
// find rule, check if query is different, offer to update. // find rule, check if query is different, offer to update.
$ruleRepository = app(RuleRepositoryInterface::class); $ruleRepository = app(RuleRepositoryInterface::class);
@@ -80,9 +79,6 @@ class SearchController extends Controller
$ruleChanged = true; $ruleChanged = true;
} }
} }
if (strlen($fullQuery) > 250) {
$longQueryWarning = true;
}
// parse search terms: // parse search terms:
$searcher->parseQuery($fullQuery); $searcher->parseQuery($fullQuery);
@@ -92,7 +88,7 @@ class SearchController extends Controller
$subTitle = (string) trans('breadcrumbs.search_result', ['query' => $fullQuery]); $subTitle = (string) trans('breadcrumbs.search_result', ['query' => $fullQuery]);
return view('search.index', compact('query', 'longQueryWarning', 'operators', 'page', 'rule', 'fullQuery', 'subTitle', 'ruleId', 'ruleChanged')); return view('search.index', compact('query', 'operators', 'page', 'rule', 'fullQuery', 'subTitle', 'ruleId', 'ruleChanged'));
} }
/** /**

View File

@@ -37,11 +37,6 @@
<input type="hidden" name="rule" value="{{ ruleId }}" /> <input type="hidden" name="rule" value="{{ ruleId }}" />
{% endif %} {% endif %}
</form> </form>
{% if longQueryWarning %}
<p class="text-danger">
{{ 'long_query_warning'|_ }}
</p>
{% endif %}
{% if '' != query %} {% if '' != query %}
<p> <p>
{{ trans('firefly.search_for_query', {query: query|escape})|raw}} {{ trans('firefly.search_for_query', {query: query|escape})|raw}}

View File

@@ -4,7 +4,7 @@
{% elseif 0 == groups.count() %} {% elseif 0 == groups.count() %}
{{ trans_choice('firefly.search_found_transactions', 0, {time: searchTime}) }} {{ trans_choice('firefly.search_found_transactions', 0, {time: searchTime}) }}
{% else %} {% else %}
{{ trans_choice('firefly.search_found_transactions', groups.perPage(), {time: searchTime}) }} {{ trans_choice('firefly.search_found_transactions', groups.count(), {time: searchTime}) }}
{% endif %} {% endif %}
</p> </p>