X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b8e2d75014c89c9e345c3f940ec8743bd158df67..refs/pull/2768/head:/app/Http/Controllers/SearchController.php diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index bb824fd9b..859857500 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -1,6 +1,6 @@ viewService = $viewService; $this->searchRunner = $searchRunner; $this->entityContextManager = $entityContextManager; } @@ -82,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]);