From 1461a35b7a478da5899c144cc13cbc2db87d4987 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 26 Jan 2024 16:34:04 +0100 Subject: [PATCH] 1413 Bug Date siteContent --- core/core.php | 2 +- core/module/language/language.php | 4 ++-- core/module/plugin/plugin.php | 4 ++-- module/blog/blog.php | 6 +++--- module/blog/changes.md | 2 ++ module/blog/view/article/article.php | 4 ++-- module/blog/view/index/index.php | 4 ++-- module/news/changes.md | 2 ++ module/news/news.php | 10 +++++----- module/news/view/article/article.php | 2 +- module/news/view/index/index.php | 2 +- 11 files changed, 23 insertions(+), 19 deletions(-) diff --git a/core/core.php b/core/core.php index 048eea7..33ec73e 100644 --- a/core/core.php +++ b/core/core.php @@ -50,7 +50,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.4.12'; + const ZWII_VERSION = '1.4.13'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/'; diff --git a/core/module/language/language.php b/core/module/language/language.php index a301bf2..d4ae845 100644 --- a/core/module/language/language.php +++ b/core/module/language/language.php @@ -255,7 +255,7 @@ class language extends common self::$languagesUiInstalled[$file] = [ template::flag($file, '20 %') . ' ' . self::$languages[$file], $value['version'], - helper::dateUTF8('%d/%m/%Y', $value['date'], self::$siteContent), + helper::dateUTF8('%d/%m/%Y', $value['date'], self::$i18nUI), //self::$i18nUI === $file ? helper::translate('Interface') : '', '', /* @@ -291,7 +291,7 @@ class language extends common self::$languagesStore[$file] = [ template::flag($file, '20 %') . ' ' . self::$languages[$file], $value['version'], - helper::dateUTF8('%d/%m/%Y', $value['date'], self::$siteContent), + helper::dateUTF8('%d/%m/%Y', $value['date'], self::$i18nUI), '', template::button('translateContentLanguageUIDownload' . $file, [ 'class' => 'buttonGreen', diff --git a/core/module/plugin/plugin.php b/core/module/plugin/plugin.php index 40f1dcd..dd7958f 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -380,7 +380,7 @@ class plugin extends common $store[$key]['category'], '' . $store[$key]['title'] . '', $store[$key]['version'], - helper::dateUTF8('%d %B %Y', $store[$key]['versionDate'], self::$siteContent), + helper::dateUTF8('%d %B %Y', $store[$key]['versionDate'], self::$i18nUI), implode(' - ', $pageInfos), template::button('moduleExport' . $key, [ 'class' => $class, @@ -406,7 +406,7 @@ class plugin extends common { $store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true); self::$storeItem = $store[$this->getUrl(2)]; - self::$storeItem['fileDate'] = helper::dateUTF8('%d %B %Y', self::$storeItem['fileDate'], self::$siteContent); + self::$storeItem['fileDate'] = helper::dateUTF8('%d %B %Y', self::$storeItem['fileDate'], self::$i18nUI); // Valeurs en sortie $this->addOutput([ 'title' => helper::translate('Module ' . self::$storeItem['title']), diff --git a/module/blog/blog.php b/module/blog/blog.php index 65eeffb..233bd2d 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -16,7 +16,7 @@ class blog extends common { - const VERSION = '7.4'; + const VERSION = '7.5'; const REALNAME = 'Blog'; const DELETE = true; const UPDATE = '0.0'; @@ -361,7 +361,7 @@ class blog extends common self::$dateFormat = $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat']); self::$timeFormat = $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat']); self::$comments[] = [ - helper::dateUTF8(self::$dateFormat, $comment['createdOn'], self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $comment['createdOn'], self::$siteContent), + helper::dateUTF8(self::$dateFormat, $comment['createdOn']) . ' - ' . helper::dateUTF8(self::$timeFormat, $comment['createdOn']), $comment['content'], $comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'], $buttonApproval, @@ -530,7 +530,7 @@ class blog extends common '' . $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) . '', - helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$siteContent), + helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])], // Bouton pour afficher les commentaires de l'article template::button('blogConfigComment' . $articleIds[$i], [ diff --git a/module/blog/changes.md b/module/blog/changes.md index 5aa199a..73c72c8 100755 --- a/module/blog/changes.md +++ b/module/blog/changes.md @@ -1,3 +1,5 @@ +# Version 7.5 +- Bug paramètre de localisation erroné # Version 7.4 - Bouton de retour dans les articles # Version 7.3 diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index b1d01ee..9eef66e 100755 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -22,7 +22,7 @@ - getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?> + getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?> getUser('password') === $this->getInput('ZWII_USER_PASSWORD') @@ -156,7 +156,7 @@ - + diff --git a/module/blog/view/index/index.php b/module/blog/view/index/index.php index a956073..691aed7 100755 --- a/module/blog/view/index/index.php +++ b/module/blog/view/index/index.php @@ -28,7 +28,7 @@ signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?> - getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent); ?> + getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
@@ -142,7 +142,7 @@ signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?> - getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent); ?> + getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) !== 0 ? $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) : 500 ?> diff --git a/module/news/changes.md b/module/news/changes.md index 84a9cac..428123d 100644 --- a/module/news/changes.md +++ b/module/news/changes.md @@ -1,3 +1,5 @@ +# Version 5.4 +- Bug paramètre de localisation erroné # Version 5.3 - Option d'un lien de retour dans la signature # Version 5.2 diff --git a/module/news/news.php b/module/news/news.php index 7e800ff..f4f6f1f 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -16,7 +16,7 @@ class news extends common { - const VERSION = '5.3'; + const VERSION = '5.4'; 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::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$siteContent); + $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); 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::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$siteContent); + $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); } else { $dateOff = helper::translate('Permanent'); } @@ -333,9 +333,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::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$siteContent); + $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); 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::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$siteContent); + $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); } else { $dateOff = helper::translate('Permanent'); } diff --git a/module/news/view/article/article.php b/module/news/view/article/article.php index f751e54..b143be5 100644 --- a/module/news/view/article/article.php +++ b/module/news/view/article/article.php @@ -16,7 +16,7 @@ - getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?> + 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); ?> getUser('password') === $this->getInput('ZWII_USER_PASSWORD') diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index 571dc8b..b0649a5 100644 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -23,7 +23,7 @@ - + getUser('password') === $this->getInput('ZWII_USER_PASSWORD')