Commit 0e655335 authored by Ad Schellevis's avatar Ad Schellevis

(menu/api) add search all, empty search string

parent 1e0365fd
......@@ -221,7 +221,10 @@ class MenuController extends ApiControllerBase
{
$menu_items = $this->getMenu(null);
$query = $this->request->get("q", null, null);
$this->search($menu_items, $query);
if ($query != null) {
// only search when a query is provided, otherwise return all entries
$this->search($menu_items, $query);
}
$items = array();
$this->extractMenuLeaves($menu_items, $items);
return $items;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment