X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/2768/head:/app/Http/Controllers/SearchController.php diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 21ebea378..859857500 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -1,9 +1,6 @@ viewService = $viewService; $this->searchRunner = $searchRunner; $this->entityContextManager = $entityContextManager; } @@ -85,7 +79,7 @@ class SearchController extends Controller $searchTerm .= ' {type:'. implode('|', $entityTypes) .'}'; $entities = $this->searchRunner->searchEntities(SearchOptions::fromString($searchTerm), 'all', 1, 20, $permission)['results']; } else { - $entities = $this->viewService->getPopular(20, 0, $entityTypes, $permission); + $entities = (new Popular)->run(20, 0, $entityTypes, $permission); } return view('search.entity-ajax-list', ['entities' => $entities]);