From b9a4fd25ffc10237a84758434614a1a29ef30d88 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 3 Nov 2023 18:00:51 +0100 Subject: [PATCH] News 5.1 --- module/news/changes.md | 2 ++ module/news/enum.json | 2 +- module/news/news.php | 11 +++++------ module/news/profil/main/add.inc.php | 2 +- module/news/profil/main/edit.inc.php | 2 +- module/news/view/article/article.php | 2 +- module/news/view/index/index.php | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/module/news/changes.md b/module/news/changes.md index 2125acb..6971a4d 100644 --- a/module/news/changes.md +++ b/module/news/changes.md @@ -1,3 +1,5 @@ +# Version 5.1 +- Erreur de profil # Version 5.0 - Gestion des permissions intégrée dans le module # Version 4.5 diff --git a/module/news/enum.json b/module/news/enum.json index 5ec740c..dab95ee 100644 --- a/module/news/enum.json +++ b/module/news/enum.json @@ -1 +1 @@ -{"name":"news","realName":"News","version":"4.4","update":"0.0","delete":true,"dataDirectory":"site\/data\/news\/"} \ No newline at end of file +{"name":"news","realName":"News","version":"5.0","update":"0.0","delete":true,"dataDirectory":"site\/data\/news\/"} \ No newline at end of file diff --git a/module/news/news.php b/module/news/news.php index 67eace5..0aeb76c 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -16,7 +16,7 @@ class news extends common { - const VERSION = '5.0'; + const VERSION = '5.1'; const REALNAME = 'News'; const DATADIRECTORY = self::DATA_DIR . 'news/'; @@ -230,9 +230,9 @@ class news extends common // News en fonction de la pagination for ($i = $pagination['first']; $i < $pagination['last']; $i++) { // Met en forme le tableau - $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nUI) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nUI); + $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent); if ($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']), self::$i18nUI) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nUI); + $dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent); } else { $dateOff = helper::translate('Permanent'); } @@ -332,9 +332,9 @@ class news extends common // News en fonction de la pagination for ($i = $pagination['first']; $i < $pagination['last']; $i++) { // Met en forme le tableau - $dateOn = $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nUI) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nUI); + $dateOn = $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent); if ($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']), self::$i18nUI) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nUI); + $dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent); } else { $dateOff = helper::translate('Permanent'); } @@ -548,7 +548,6 @@ class news extends common } } - /** * Mise à jour du module * Appelée par les fonctions index et config diff --git a/module/news/profil/main/add.inc.php b/module/news/profil/main/add.inc.php index de70afb..a431d52 100644 --- a/module/news/profil/main/add.inc.php +++ b/module/news/profil/main/add.inc.php @@ -5,6 +5,6 @@ 'option' => $this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN), 'config' => $this->getInput('profilAddNewsAdd', helper::FILTER_BOOLEAN) || $this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN) || - $this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddNewsDelete', helper::FILTER_BOOLEAN) || $this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN) ]; \ No newline at end of file diff --git a/module/news/profil/main/edit.inc.php b/module/news/profil/main/edit.inc.php index 1b8f76d..94d6957 100644 --- a/module/news/profil/main/edit.inc.php +++ b/module/news/profil/main/edit.inc.php @@ -5,6 +5,6 @@ 'option' => $this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN), 'config' => $this->getInput('profilEditNewsAdd', helper::FILTER_BOOLEAN) || $this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN) || - $this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditNewsDelete', helper::FILTER_BOOLEAN) || $this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN) ]; \ No newline at end of file diff --git a/module/news/view/article/article.php b/module/news/view/article/article.php index b01dc1a..c006e6e 100644 --- a/module/news/view/article/article.php +++ b/module/news/view/article/article.php @@ -9,7 +9,7 @@ - getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?> + getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nContent); ?> getUser('password') === $this->getInput('ZWII_USER_PASSWORD') diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index 45a58d9..4e3d649 100644 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -23,7 +23,7 @@ - +