From 696ca111b70f7281d4941e820bdca8dd7cd185ff Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 26 Jan 2024 16:34:01 +0100 Subject: [PATCH] 13103 Bug Date siteContent --- core/core.php | 2 +- core/module/config/config.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 +- 12 files changed, 24 insertions(+), 20 deletions(-) diff --git a/core/core.php b/core/core.php index 6726ff27..853a7cca 100644 --- a/core/core.php +++ b/core/core.php @@ -1392,7 +1392,7 @@ class common public function saveLog($message = '') { // Journalisation - $dataLog = helper::dateUTF8('%Y%m%d', time(), self::$siteContent) . ';' . helper::dateUTF8('%H:%M', time(), self::$siteContent). ';'; + $dataLog = helper::dateUTF8('%Y%m%d', time(), self::$i18nUI) . ';' . helper::dateUTF8('%H:%M', time(), self::$i18nUI). ';'; $dataLog .= helper::getIp($this->getData(['config', 'connect', 'anonymousIp'])) . ';'; $dataLog .= empty($this->getUser('id')) ? 'visitor;' : $this->getUser('id') . ';'; $dataLog .= $message ? $this->getUrl() . ';' . $message : $this->getUrl(); diff --git a/core/module/config/config.php b/core/module/config/config.php index aa19077c..900aa500 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -780,7 +780,7 @@ class config extends common $d = $this->getData(['blacklist']); $data = ''; foreach ($d as $key => $item) { - $data .= helper::dateUTF8('%Y %m %d', $item['lastFail'], self::$siteContent) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$siteContent); + $data .= helper::dateUTF8('%Y %m %d', $item['lastFail'], self::$i18nUI) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$i18nUI); $data .= $key . ';' . $item['ip'] . ';' . $item['connectFail'] . PHP_EOL; } file_put_contents($fileName, $data, FILE_APPEND); diff --git a/core/module/language/language.php b/core/module/language/language.php index 62ea280b..74a2dec4 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 07d41d78..6ebd3947 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -377,7 +377,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, @@ -403,7 +403,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 65eeffb3..0cbc3da5 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'], self::$i18nUI) . ' - ' . helper::dateUTF8(self::$timeFormat, $comment['createdOn'], self::$i18nUI), $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']), self::$i18nUI) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$i18nUI), 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 5aa199a7..73c72c89 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 b1d01ee5..9eef66e4 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 a9560734..691aed74 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 84a9cac6..428123d7 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 7e800ff0..f4f6f1f1 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 f751e546..b143be50 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 571dc8bb..b0649a58 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')