From 8b864fe9f90cd1b14bd718e2db227614c5e8df7c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sat, 4 Apr 2020 15:54:19 +0200 Subject: [PATCH] =?UTF-8?q?parametre=20template::table=20et=20=C3=A9dition?= =?UTF-8?q?=20de=20galerie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/template.class.php | 4 +++- module/gallery/gallery.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/class/template.class.php b/core/class/template.class.php index b550386e..290edf67 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -628,7 +628,9 @@ class template { // Fin des entêtes $html .= ''; $html .= ''; - } + } + // Pas de tableau d'Id transmis, générer une numérotation + $rowsId = range(0,count($body)); // Début contenu $j = 0; foreach($body as $tr) { diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 60d159be..458fb4cc 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -235,7 +235,8 @@ class gallery extends common { 'name' => $this->getInput('galleryEditName', helper::FILTER_STRING_SHORT, true), 'directory' => $this->getInput('galleryEditDirectory', helper::FILTER_STRING_SHORT, true), 'homePicture' => $homePictures[$file], - 'sort' => $this->getInput('galleryEditSort') + 'sort' => $this->getInput('galleryEditSort'), + 'position' => count($this->getData(['module',$this->getUrl(0)])) + 1 ], 'legend' => $legends ]]);