From 8d79dc349152497f6b2e65bf23b7b3f19652ac52 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 13 Apr 2020 15:00:38 +0200 Subject: [PATCH] =?UTF-8?q?[2.4]=20incoh=C3=A9rence=20nom=20fichier=20et?= =?UTF-8?q?=20nom=20de=20la=20couverture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/gallery/gallery.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 6c5ba97c..fb8e279f 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -43,7 +43,7 @@ class gallery extends common { public static $thumbs = []; - const GALLERY_VERSION = '2.3'; + const GALLERY_VERSION = '2.4'; /** @@ -430,9 +430,9 @@ class gallery extends common { if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) { self::$galleries[$galleryId] = $gallery; // Créer la miniature si manquante - if (!file_exists( str_replace('source','thumb',$fileInfos->getPathname()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) { - $this->makeThumb($fileInfos->getPathname(), - str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), + if (!file_exists( str_replace('source','thumb',$fileInfos->getPathname()) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']))) { + $this->makeThumb($gallery['config']['directory'] . '/' . str_replace(self::THUMBS_SEPARATOR ,'',$gallery['config']['homePicture']), + str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']), self::THUMBS_WIDTH); } // Définir l'image de couverture