From 861d2877505b0bc5f282035ca20553a5e2e4b0a0 Mon Sep 17 00:00:00 2001 From: Scott Holodak Date: Wed, 11 Sep 2019 13:42:33 -0400 Subject: [PATCH] Improved custom search handling --- app/Search.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/Search.php b/app/Search.php index 05da1851..2d65413c 100644 --- a/app/Search.php +++ b/app/Search.php @@ -89,10 +89,14 @@ abstract class Search if(empty($app->class)) continue; if(($provider = Item::isSearchProvider($app->class)) !== false) { $name = Item::nameFromClass($app->class); - $providers[strtolower($name)] = [ + $providers[$app->id] = [ 'type' => $provider->type, 'class' => $app->class, 'url' => $app->url, + 'title' => $app->title, + 'colour' => $app->colour, + 'icon' => $app->icon, + 'description' => $app->description ]; } @@ -130,7 +134,11 @@ abstract class Search $output .= ''; $output .= Form::text('q', null, ['class' => 'homesearch', 'autofocus' => 'autofocus', 'placeholder' => __('app.settings.search').'...']); @@ -144,4 +152,4 @@ abstract class Search } -} \ No newline at end of file +}