]> BookStack Code Mirror - bookstack/blobdiff - app/Actions/ViewService.php
Add base64 image support
[bookstack] / app / Actions / ViewService.php
index 51a60d96e20effd49c6eda2ea7f247deb828d6a6..f04384536ec8586a7a15153523b0196a1f3c3d95 100644 (file)
@@ -65,7 +65,7 @@ class ViewService
     {
         $skipCount = $count * $page;
         $query = $this->permissionService
-            ->filterRestrictedEntityRelations($this->view, 'views', 'viewable_id', 'viewable_type', $action)
+            ->filterRestrictedEntityRelations($this->view->newQuery(), 'views', 'viewable_id', 'viewable_type', $action)
             ->select('*', 'viewable_id', 'viewable_type', DB::raw('SUM(views) as view_count'))
             ->groupBy('viewable_id', 'viewable_type')
             ->orderBy('view_count', 'desc');