diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 3fc1deaa..7f4d6857 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -221,7 +221,17 @@ class gallery extends common { } } // Tri des images par ordre alphabétique - ksort(self::$pictures,SORT_NATURAL); + switch ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'config', 'order'])) { + case 'none': + break; + case 'dsc': + krsort(self::$pictures,SORT_NATURAL); + break; + case 'asc': + default: + ksort(self::$pictures,SORT_NATURAL); + break; + } } // Valeurs en sortie $this->addOutput([ diff --git a/module/gallery/view/edit/edit.php b/module/gallery/view/edit/edit.php index 3655e5d0..3994556e 100644 --- a/module/gallery/view/edit/edit.php +++ b/module/gallery/view/edit/edit.php @@ -37,6 +37,7 @@
$this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'config', 'order']), 'label' => 'Tri des images', 'help' => 'Les images sont triées par nom de fichier grâce à la méthode naturelle qui donne de meilleurs résultats lorsque les images sont numérotées.' ]); ?>