Move search term emptiness check before content checks in Search\Index

This commit is contained in:
Hypolite Petovan 2019-12-24 17:17:27 -05:00
parent ec7eb9d83a
commit 1c9cb42d98

View file

@ -82,6 +82,10 @@ class Index extends BaseSearchModule
'$content' => HTML::search($search, 'search-box', false)
]);
if (!$search) {
return $o;
}
if (strpos($search, '#') === 0) {
$tag = true;
$search = substr($search, 1);
@ -115,10 +119,6 @@ class Index extends BaseSearchModule
}
}
if (!$search) {
return $o;
}
$tag = $tag || Config::get('system', 'only_tag_search');
// Here is the way permissions work in the search module...