Move search term emptiness check before content checks in Search\Index
This commit is contained in:
parent
ec7eb9d83a
commit
1c9cb42d98
|
@ -82,6 +82,10 @@ class Index extends BaseSearchModule
|
||||||
'$content' => HTML::search($search, 'search-box', false)
|
'$content' => HTML::search($search, 'search-box', false)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (!$search) {
|
||||||
|
return $o;
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($search, '#') === 0) {
|
if (strpos($search, '#') === 0) {
|
||||||
$tag = true;
|
$tag = true;
|
||||||
$search = substr($search, 1);
|
$search = substr($search, 1);
|
||||||
|
@ -115,10 +119,6 @@ class Index extends BaseSearchModule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$search) {
|
|
||||||
return $o;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tag = $tag || Config::get('system', 'only_tag_search');
|
$tag = $tag || Config::get('system', 'only_tag_search');
|
||||||
|
|
||||||
// Here is the way permissions work in the search module...
|
// Here is the way permissions work in the search module...
|
||||||
|
|
Loading…
Reference in a new issue