From bfd7a8100d34870a676aa5aaf01875ceae9df2b6 Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Sat, 13 Oct 2018 04:47:48 +0100 Subject: [PATCH] Album URL now uses the Photo's thumbnailUrl method - allowing for cache-busting on the main gallery index --- app/Album.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Album.php b/app/Album.php index d19c77b..e375df9 100644 --- a/app/Album.php +++ b/app/Album.php @@ -203,8 +203,6 @@ class Album extends Model return $this->hasMany(Photo::class); } - - public function redirects() { return $this->hasMany(AlbumRedirect::class); @@ -217,13 +215,14 @@ class Album extends Model public function thumbnailUrl($thumbnailName) { + /** @var Photo $photo */ $photo = $this->photos() ->inRandomOrder() ->first(); if (!is_null($photo)) { - return $this->getAlbumSource()->getUrlToPhoto($photo, $thumbnailName); + return $photo->thumbnailUrl($thumbnailName); } // See if any child albums have an image