]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/ImageRepo.php
reduced icon size
[bookstack] / app / Repos / ImageRepo.php
index 0c15a4310062446e47a37f869e6777ddf97790c2..ec2fda1d36fd443e09bbe50264f55d39b9bec700 100644 (file)
@@ -92,7 +92,7 @@ class ImageRepo
      * @param string $searchTerm
      * @return array
      */
-    public function searchPaginatedByType($type, $page = 0, $pageSize = 24, $searchTerm)
+    public function searchPaginatedByType($type, $searchTerm, $page = 0, $pageSize = 24)
     {
         $images = $this->image->where('type', '=', strtolower($type))->where('name', 'LIKE', '%' . $searchTerm . '%');
         return $this->returnPaginated($images, $page, $pageSize);
@@ -101,13 +101,13 @@ class ImageRepo
     /**
      * Get gallery images with a particular filter criteria such as
      * being within the current book or page.
-     * @param int $pagination
-     * @param int $pageSize
      * @param $filter
      * @param $pageId
+     * @param int $pageNum
+     * @param int $pageSize
      * @return array
      */
-    public function getGalleryFiltered($pagination = 0, $pageSize = 24, $filter, $pageId)
+    public function getGalleryFiltered($filter, $pageId, $pageNum = 0, $pageSize = 24)
     {
         $images = $this->image->where('type', '=', 'gallery');
 
@@ -120,7 +120,7 @@ class ImageRepo
             $images = $images->whereIn('uploaded_to', $validPageIds);
         }
 
-        return $this->returnPaginated($images, $pagination, $pageSize);
+        return $this->returnPaginated($images, $pageNum, $pageSize);
     }
 
     /**
@@ -254,5 +254,4 @@ class ImageRepo
         $validTypes = ['drawing', 'gallery', 'cover', 'system', 'user'];
         return in_array($type, $validTypes);
     }
-
-}
\ No newline at end of file
+}