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 ]]);