]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/ImageRepo.php
Added initial translation into German (formal)
[bookstack] / app / Repos / ImageRepo.php
index 8dd4d346d52316e7ea76d7684fc8c4eb37c65b36..435b8bbd795666bddc12d1b8e0e687eecb4bcb8b 100644 (file)
@@ -4,7 +4,7 @@
 use BookStack\Image;
 use BookStack\Page;
 use BookStack\Services\ImageService;
-use BookStack\Services\RestrictionService;
+use BookStack\Services\PermissionService;
 use Setting;
 use Symfony\Component\HttpFoundation\File\UploadedFile;
 
@@ -13,21 +13,21 @@ class ImageRepo
 
     protected $image;
     protected $imageService;
-    protected $restictionService;
+    protected $restrictionService;
     protected $page;
 
     /**
      * ImageRepo constructor.
      * @param Image $image
      * @param ImageService $imageService
-     * @param RestrictionService $restrictionService
+     * @param PermissionService $permissionService
      * @param Page $page
      */
-    public function __construct(Image $image, ImageService $imageService, RestrictionService $restrictionService, Page $page)
+    public function __construct(Image $image, ImageService $imageService, PermissionService $permissionService, Page $page)
     {
         $this->image = $image;
         $this->imageService = $imageService;
-        $this->restictionService = $restrictionService;
+        $this->restrictionService = $permissionService;
         $this->page = $page;
     }
 
@@ -52,7 +52,7 @@ class ImageRepo
      */
     private function returnPaginated($query, $page = 0, $pageSize = 24)
     {
-        $images = $this->restictionService->filterRelatedPages($query, 'images', 'uploaded_to');
+        $images = $this->restrictionService->filterRelatedPages($query, 'images', 'uploaded_to');
         $images = $images->orderBy('created_at', 'desc')->skip($pageSize * $page)->take($pageSize + 1)->get();
         $hasMore = count($images) > $pageSize;