]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/SearchController.php
Updated Swedish translation
[bookstack] / app / Http / Controllers / SearchController.php
index 0faeb0decfe35cb500013bd6756a1b12dd42af5e..ddc92f7055cb97570cfca5ce74b0398ac461d18a 100644 (file)
@@ -40,13 +40,12 @@ class SearchController extends Controller
         $nextPageLink = baseUrl('/search?term=' . urlencode($searchTerm) . '&page=' . ($page+1));
 
         $results = $this->searchService->searchEntities($searchTerm, 'all', $page, 20);
-        $hasNextPage = $this->searchService->searchEntities($searchTerm, 'all', $page+1, 20)['count'] > 0;
 
         return view('search/all', [
             'entities'   => $results['results'],
             'totalResults' => $results['total'],
             'searchTerm' => $searchTerm,
-            'hasNextPage' => $hasNextPage,
+            'hasNextPage' => $results['has_more'],
             'nextPageLink' => $nextPageLink
         ]);
     }
@@ -104,7 +103,4 @@ class SearchController extends Controller
 
         return view('search/entity-ajax-list', ['entities' => $entities]);
     }
-
 }
-
-