X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/8c190324ac5f8debdb5ee643a38a36667d977bfd..refs/pull/1756/head:/app/Uploads/ImageRepo.php diff --git a/app/Uploads/ImageRepo.php b/app/Uploads/ImageRepo.php index 16d1bb3d1..da0b7d379 100644 --- a/app/Uploads/ImageRepo.php +++ b/app/Uploads/ImageRepo.php @@ -25,8 +25,7 @@ class ImageRepo ImageService $imageService, PermissionService $permissionService, Page $page - ) - { + ) { $this->image = $image; $this->imageService = $imageService; $this->restrictionService = $permissionService; @@ -87,8 +86,7 @@ class ImageRepo int $uploadedTo = null, string $search = null, callable $whereClause = null - ) - { + ) { $imageQuery = $this->image->newQuery()->where('type', '=', strtolower($type)); if ($uploadedTo !== null) { @@ -126,13 +124,12 @@ class ImageRepo int $pageSize = 24, int $uploadedTo = null, string $search = null - ) - { + ) { $contextPage = $this->page->findOrFail($uploadedTo); $parentFilter = null; if ($filterType === 'book' || $filterType === 'page') { - $parentFilter = function(Builder $query) use ($filterType, $contextPage) { + $parentFilter = function (Builder $query) use ($filterType, $contextPage) { if ($filterType === 'page') { $query->where('uploaded_to', '=', $contextPage->id); } elseif ($filterType === 'book') { @@ -233,7 +230,7 @@ class ImageRepo { $image->thumbs = [ 'gallery' => $this->getThumbnail($image, 150, 150, false), - 'display' => $this->getThumbnail($image, 840, null, true) + 'display' => $this->getThumbnail($image, 1680, null, true) ]; }