Skip to content
Snippets Groups Projects
Unverified Commit 3286c65d authored by Michael Große's avatar Michael Große
Browse files

fix(search): don't search for current page if submitting empty form

Pressing enter in the small quick-search-box while it was empty resulted
in a search for the current pageid.
parent 220966d3
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ class Search extends AbstractAction {
global $QUERY, $ID, $conf, $INPUT;
$s = cleanID($QUERY);
if ($ID !== $conf['start'] && $s === '') {
if ($ID !== $conf['start'] && !$INPUT->has('q')) {
parse_str($INPUT->server->str('QUERY_STRING'), $urlParts);
$urlParts['q'] = $urlParts['id'];
$urlParts['id'] = $conf['start'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment