From 13627f5e59abd083ffbd3ff484ef3de1b3c41421 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 25 Sep 2020 19:34:51 +0200 Subject: [PATCH] Fix pb position gallery --- 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 1eef8ab4..6177966d 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -19,7 +19,7 @@ class gallery extends common { const SORT_ASC = 'SORT_ASC'; const SORT_DSC = 'SORT_DSC'; const SORT_HAND = 'SORT_HAND'; - const GALLERY_VERSION = '2.4'; + const GALLERY_VERSION = '2.41'; public static $directories = []; @@ -178,7 +178,7 @@ class gallery extends common { 'directory' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','directory']), 'homePicture' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','homePicture']), 'sort' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','sort']), - 'position' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','positions']), + 'position' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','position']), 'fullScreen' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','fullScreen']) ], @@ -259,7 +259,7 @@ class gallery extends common { 'directory' => $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true), 'homePicture' => $homePicture, 'sort' => self::SORT_ASC, - 'position' => $this->getData(['module',$this->getUrl(0)]) !== null ? count($this->getData(['module',$this->getUrl(0)])) + 1 : 0, + 'position' => $this->getData(['module', $this->getUrl(0), $galleryId,'config','position']), 'fullScreen' => false ], 'legend' => [], @@ -382,7 +382,7 @@ class gallery extends common { 'homePicture' => $homePicture, // pas de positions, on active le tri alpha 'sort' => $this->getInput('galleryEditSort'), - 'position' => $this->getData(['module', $this->getUrl(0), $galleryId,'config','positions']) === null ? count($this->getData(['module',$this->getUrl(0)]))-1 : $this->getData(['module', $this->getUrl(0), $galleryId,'config','positions']), + 'position' => $this->getData(['module', $this->getUrl(0), $galleryId,'config','position']), 'fullScreen' => $this->getInput('galleryEditFullscreen', helper::FILTER_BOOLEAN) ],