news okay
This commit is contained in:
parent
f159f0b304
commit
993c283778
@ -321,12 +321,15 @@ class news extends common
|
|||||||
$pagination = helper::pagination($newsIds, $this->getUrl(), $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']));
|
$pagination = helper::pagination($newsIds, $this->getUrl(), $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']));
|
||||||
// Liste des pages
|
// Liste des pages
|
||||||
self::$pages = $pagination['pages'];
|
self::$pages = $pagination['pages'];
|
||||||
|
// Format de temps
|
||||||
|
self::$dateFormat = $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat']);
|
||||||
|
self::$timeFormat = $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat']);
|
||||||
// News en fonction de la pagination
|
// News en fonction de la pagination
|
||||||
for ($i = $pagination['first']; $i < $pagination['last']; $i++) {
|
for ($i = $pagination['first']; $i < $pagination['last']; $i++) {
|
||||||
// Met en forme le tableau
|
// Met en forme le tableau
|
||||||
$dateOn = $dateOn = helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn'])) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']));
|
$dateOn = $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn'])) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']));
|
||||||
if ($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff'])) {
|
if ($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff'])) {
|
||||||
$dateOff = helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff'])) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']));
|
$dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff'])) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']));
|
||||||
} else {
|
} else {
|
||||||
$dateOff = helper::translate('Permanent');
|
$dateOff = helper::translate('Permanent');
|
||||||
}
|
}
|
||||||
@ -621,7 +624,7 @@ class news extends common
|
|||||||
$this->setData(['module', $this->getUrl(0), 'config', 'dateFormat', '%d %B %Y']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'dateFormat', '%d %B %Y']);
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
||||||
// Mettre à jour la version
|
// Mettre à jour la version
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '3.4']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '4.4']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user