Position au singulier

This commit is contained in:
Fred Tempez 2024-08-08 06:21:22 +02:00
parent 5fca53f997
commit 86dc5afbdf

View File

@ -169,7 +169,7 @@ class geogallery extends common
'directory' => $this->getInput('galleryAddDirectory', helper::FILTER_STRING_SHORT, true), 'directory' => $this->getInput('galleryAddDirectory', helper::FILTER_STRING_SHORT, true),
], ],
'legend' => [], 'legend' => [],
'positions' => [] 'position' => []
] ]
]); ]);
$success = true; $success = true;
@ -270,7 +270,7 @@ class geogallery extends common
], ],
'legend' => $legends, 'legend' => $legends,
//'geo' => $geo, //'geo' => $geo,
'positions' => $geo 'position' => $geo
] ]
]); ]);
// Valeurs en sortie // Valeurs en sortie
@ -317,7 +317,7 @@ class geogallery extends common
} }
self::$pictures[str_replace('.', '', $fileInfos->getFilename())] = [ self::$pictures[str_replace('.', '', $fileInfos->getFilename())] = [
//$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'positions', str_replace('.', '', $fileInfos->getFilename())]) + 1, //$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'position', str_replace('.', '', $fileInfos->getFilename())]) + 1,
$fileInfos->getFilename(), $fileInfos->getFilename(),
template::text('legend[' . $fileInfos->getFilename() . ']', [ template::text('legend[' . $fileInfos->getFilename() . ']', [
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'legend', str_replace('.', '', $fileInfos->getFilename())]) 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'legend', str_replace('.', '', $fileInfos->getFilename())])
@ -338,7 +338,7 @@ class geogallery extends common
// Tri des images // Tri des images
switch ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort'])) { switch ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort'])) {
case self::SORT_HAND: case self::SORT_HAND:
$positions = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'positions']); $positions = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'position']);
if ($positions) { if ($positions) {
foreach ($positions as $key => $value) { foreach ($positions as $key => $value) {
if (array_key_exists($key, self::$pictures)) { if (array_key_exists($key, self::$pictures)) {
@ -417,8 +417,8 @@ class geogallery extends common
]; ];
} else { } else {
self::$galleries[] = [ self::$galleries[] = [
'lat' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'positions', 'directory', str_replace('.', '', $fileInfos->getFilename())]), 'lat' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'position', 'directory', str_replace('.', '', $fileInfos->getFilename())]),
'long' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'positions', 'directory', str_replace('.', '', $fileInfos->getFilename())]), 'long' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'position', 'directory', str_replace('.', '', $fileInfos->getFilename())]),
'img'=> $fileInfos->getPath() . '/' . strtolower($fileInfos->getFilename()), 'img'=> $fileInfos->getPath() . '/' . strtolower($fileInfos->getFilename()),
'thumb' => str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), 'thumb' => str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()),
'label' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.', '', $fileInfos->getFilename())]) 'label' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.', '', $fileInfos->getFilename())])