doc/search: do not search with less than 3 chars
Please consider this a quickfix to avoid mass results while typing in the global search field. We need farther improvements here: * compact mode: e.g. title/first match on one row * show a hint when less than 3 chars have been provided * allow two chars once we fixed the above
This commit is contained in:
parent
a3f2d7de7e
commit
6bf8849d98
|
@ -25,6 +25,10 @@ class Doc_SearchController extends DocController
|
|||
)
|
||||
);
|
||||
$search->setUrl('doc/icingaweb/chapter');
|
||||
if (strlen($this->params->get('q')) < 3) {
|
||||
$this->view->searches = array();
|
||||
return;
|
||||
}
|
||||
$searches = array(
|
||||
'Icinga Web 2' => $search
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue