From 6608f4dbd968cecf1293c45c3c442fbf34b77666 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 30 Mar 2022 12:30:27 +0200 Subject: [PATCH] init --- module/gallery/gallery.php | 9 ++++----- module/gallery/view/config/config.php | 2 +- module/gallery/view/edit/edit.php | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index aad375f0..c6607fb9 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -345,7 +345,7 @@ class gallery extends common { } // Met en forme le tableau self::$galleries[] = [ - template::ico('sort'), + $gallery['config']['position'] + 1, $gallery['config']['name'], $gallery['config']['directory'], template::button('galleryConfigEdit' . $galleryId , [ @@ -570,7 +570,7 @@ class gallery extends common { ], 'legend' => $legends, - 'positions' => empty($oldPositions) ? $this->getdata(['module', $this->getUrl(0), 'content', $galleryId, 'positions']) : $oldPositions + 'positions' => empty($oldPositions) ? $this->getData(['module', $this->getUrl(0), 'content', $galleryId, 'positions']) : $oldPositions ]]); } // Valeurs en sortie @@ -584,7 +584,6 @@ class gallery extends common { $directory = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']); if(is_dir($directory)) { $iterator = new DirectoryIterator($directory); - foreach($iterator as $fileInfos) { if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) { // Créer la miniature RFM si manquante @@ -594,7 +593,7 @@ class gallery extends common { 122); } self::$pictures[str_replace('.','',$fileInfos->getFilename())] = [ - template::ico('sort'), + $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'positions', str_replace('.','',$fileInfos->getFilename())]) + 1, $fileInfos->getFilename(), template::checkbox( 'homePicture[' . $fileInfos->getFilename() . ']', true, '', [ 'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2),'config', 'homePicture']) === $fileInfos->getFilename() ? true : false, @@ -611,7 +610,7 @@ class gallery extends common { // Tri des images switch ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort'])) { case self::SORT_HAND: - $positions = $this->getdata(['module',$this->getUrl(0), $this->getUrl(2),'positions']); + $positions = $this->getData(['module',$this->getUrl(0), $this->getUrl(2),'positions']); if ($positions) { foreach ($positions as $key => $value) { if (array_key_exists($key,self::$pictures)) { diff --git a/module/gallery/view/config/config.php b/module/gallery/view/config/config.php index d80038c3..2d1a0a38 100644 --- a/module/gallery/view/config/config.php +++ b/module/gallery/view/config/config.php @@ -30,7 +30,7 @@
- 'galleryTable'],$module::$galleriesId); ?> + 'galleryTable'],$module::$galleriesId); ?> diff --git a/module/gallery/view/edit/edit.php b/module/gallery/view/edit/edit.php index ca300f61..80d066ba 100644 --- a/module/gallery/view/edit/edit.php +++ b/module/gallery/view/edit/edit.php @@ -64,7 +64,7 @@
- 'galleryTable'], $module::$picturesId ); ?> + 'galleryTable'], $module::$picturesId ); ?> $this->getUrl(2)]); ?>