[2.4] incohérence nom fichier et nom de la couverture

This commit is contained in:
Fred Tempez 2020-04-13 15:00:38 +02:00
parent 9b141bda45
commit 8d79dc3491

View File

@ -43,7 +43,7 @@ class gallery extends common {
public static $thumbs = []; 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())) { if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
self::$galleries[$galleryId] = $gallery; self::$galleries[$galleryId] = $gallery;
// Créer la miniature si manquante // Créer la miniature si manquante
if (!file_exists( str_replace('source','thumb',$fileInfos->getPathname()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) { if (!file_exists( str_replace('source','thumb',$fileInfos->getPathname()) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']))) {
$this->makeThumb($fileInfos->getPathname(), $this->makeThumb($gallery['config']['directory'] . '/' . str_replace(self::THUMBS_SEPARATOR ,'',$gallery['config']['homePicture']),
str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']),
self::THUMBS_WIDTH); self::THUMBS_WIDTH);
} }
// Définir l'image de couverture // Définir l'image de couverture