@@ -53,10 +53,6 @@ public function getPictureData(GalleryCreatorPicturesModel $pictureModel, Conten
5353 return null ;
5454 }
5555
56- if (!is_file ($ filesModel ->getAbsolutePath ())) {
57- return null ;
58- }
59-
6056 // Meta
6157 $ arrMeta = Frontend::getMetaData ($ filesModel ->meta , $ objPage ->language );
6258
@@ -66,7 +62,7 @@ public function getPictureData(GalleryCreatorPicturesModel $pictureModel, Conten
6662
6763 $ arrMeta ['title ' ] = $ pictureModel ->caption ?? $ arrMeta ['title ' ];
6864
69- // Get thumb dimensions
65+ // Get the thumb dimensions
7066 $ arrSize = StringUtil::deserialize ($ contentElementModel ->gcSizeDetailView );
7167
7268 $ href = null ;
@@ -98,15 +94,15 @@ public function getPictureData(GalleryCreatorPicturesModel $pictureModel, Conten
9894 return [
9995 'ownerRow ' => $ ownerModel ? $ ownerModel ->row () : [],
10096 'filesRow ' => $ filesModel ->row (),
101- 'pictureRow ' => $ pictureModel ->row ,
97+ 'pictureRow ' => $ pictureModel ->row () ,
10298 'albumRow ' => $ pictureModel ->getRelated ('pid ' )->row (),
10399 'meta ' => $ arrMeta ,
104100 'href ' => $ href ,
105101 'localMediaSrc ' => $ localMediaSrc ,
106102 'socialMediaSrc ' => $ socialMediaSrc ,
107103 'exif ' => $ this ->galleryCreatorReadExifMetaData ? $ this ->getExif (new File ($ filesModel ->path )) : [],
108104 'singleImageUrl ' => StringUtil::ampersand ($ objPage ->getFrontendUrl ((Config::get ('useAutoItem ' ) ? '/ ' : '/items/ ' ).Input::get ('items ' ).'/img/ ' .$ filesModel ->name , $ objPage ->language )),
109- 'figureUuid ' => $ pictureModel ->addCustomThumb ? $ pictureModel ->customThumb : $ filesModel ->uuid ,
105+ 'figureUuid ' => $ pictureModel ->addCustomThumb && $ pictureModel -> customThumb ? $ pictureModel ->customThumb : $ filesModel ->uuid ,
110106 'figureSize ' => !empty ($ arrSize ) ? $ arrSize : null ,
111107 'figureHref ' => $ href ,
112108 'figureOptions ' => [
@@ -133,4 +129,15 @@ public function getExif(File $file): array
133129
134130 return $ exif ;
135131 }
132+
133+ public function pictureExists (GalleryCreatorPicturesModel $ picturesModel ): bool
134+ {
135+ $ objFile = FilesModel::findByUuid ($ picturesModel ->uuid );
136+
137+ if (null !== $ objFile ) {
138+ return is_file ($ objFile ->getAbsolutePath ());
139+ }
140+
141+ return false ;
142+ }
136143}
0 commit comments