1413 Bug Date siteContent

This commit is contained in:
Fred Tempez 2024-01-26 16:34:04 +01:00
parent e2b0a12824
commit 1461a35b7a
11 changed files with 23 additions and 19 deletions

View File

@ -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/';

View File

@ -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',

View File

@ -380,7 +380,7 @@ class plugin extends common
$store[$key]['category'],
'<a href="' . self::BASEURL_STORE . self::MODULE_STORE . $key . '" target="_blank" >' . $store[$key]['title'] . '</a>',
$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']),

View File

@ -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
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
'</a>',
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], [

View File

@ -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

View File

@ -22,7 +22,7 @@
<?php echo template::ico('user'); ?>
<?php echo $module::$articleSignature; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->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); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->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); ?>
<!-- Bloc edition -->
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
@ -156,7 +156,7 @@
<?php echo template::ico('user'); ?>
<?php echo $module::$commentsSignature[$commentId]; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $comment['createdOn'], self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $comment['createdOn'], self::$siteContent); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $comment['createdOn'], self::$i18nUI) . ' - ' . helper::dateUTF8($module::$timeFormat, $comment['createdOn'], self::$i18nUI); ?>
</h4>
<?php echo $comment['content']; ?>
</div>

View File

@ -28,7 +28,7 @@
<?php echo template::ico('user'); ?>
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent) . '&nbsp;' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI) . '&nbsp;' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
</div>
</div>
<div class="row">
@ -142,7 +142,7 @@
<?php echo template::ico('user'); ?>
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent) . '&nbsp;' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI) . '&nbsp;' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
</div>
<div class="blogContent">
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) !== 0 ? $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) : 500 ?>

View File

@ -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

View File

@ -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');
}

View File

@ -16,7 +16,7 @@
<?php echo template::ico('user'); ?>
<?php echo $module::$articleSignature . ' - '; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . '&nbsp' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI) . '&nbsp' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<!-- Bloc edition -->
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')

View File

@ -23,7 +23,7 @@
<?php echo template::ico('user'); ?>
<?php echo $news['userId'] . ' - '; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn'], self::$siteContent) . '&nbsp;' . helper::dateUTF8($module::$timeFormat, $news['publishedOn'], self::$siteContent); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn'], self::$i18nUI) . '&nbsp;' . helper::dateUTF8($module::$timeFormat, $news['publishedOn'], self::$i18nUI); ?>
<!-- Bloc edition -->
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')