forked from ZwiiCMS-Team/ZwiiCMS
Dates UTF8
This commit is contained in:
parent
c88da6198b
commit
af3d4dfa41
@ -23,7 +23,7 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
|
||||
|
||||
/* Set locale to French */
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
setlocale (LC_TIME, 'fra_FRA', 'french');
|
||||
setlocale (LC_TIME, 'fr_FR.utf8','fra');
|
||||
|
||||
/**
|
||||
* Initialisation de Zwii
|
||||
|
@ -127,7 +127,7 @@ class blog extends common {
|
||||
// Met en forme le tableau
|
||||
$comment = $comments[$commentIds[$i]];
|
||||
self::$comments[] = [
|
||||
utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])),
|
||||
strftime('%d %B %Y - %H:%M', $comment['createdOn']),
|
||||
$comment['content'],
|
||||
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
|
||||
template::button('blogCommentDelete' . $commentIds[$i], [
|
||||
@ -191,9 +191,9 @@ class blog extends common {
|
||||
self::$articles[] = [
|
||||
$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'title']),
|
||||
// date('d/m/Y H:i', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
|
||||
utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])))
|
||||
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))
|
||||
.' à '.
|
||||
utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))),
|
||||
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
|
||||
self::$states[$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'state'])],
|
||||
template::button('blogConfigEdit' . $articleIds[$i], [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $articleIds[$i] . '/' . $_SESSION['csrf'],
|
||||
|
@ -2,8 +2,8 @@
|
||||
<div class="col10">
|
||||
<div class="blogDate">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
||||
à <?php echo utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
||||
<?php echo strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?>
|
||||
à <?php echo strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(
|
||||
@ -110,7 +110,7 @@
|
||||
<?php else: ?>
|
||||
<?php echo $comment['author']; ?>
|
||||
<?php endif; ?>
|
||||
le <?php echo utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])); ?>
|
||||
le <?php echo strftime('%d %B %Y - %H:%M', $comment['createdOn']); ?>
|
||||
</h4>
|
||||
<?php echo $comment['content']; ?>
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="blogDate">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
|
||||
<?php echo strftime('%d %B %Y', $article['publishedOn']); ?>
|
||||
</div>
|
||||
<p class="blogContent">
|
||||
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
|
||||
|
@ -91,9 +91,9 @@ class news extends common {
|
||||
// Met en forme le tableau
|
||||
self::$news[] = [
|
||||
$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'title']),
|
||||
utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])))
|
||||
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))
|
||||
.' à '.
|
||||
utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))),
|
||||
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])),
|
||||
self::$states[$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'state'])],
|
||||
template::button('newsConfigEdit' . $newsIds[$i], [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsIds[$i]. '/' . $_SESSION['csrf'],
|
||||
|
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="newsSignature">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
||||
<?php echo strftime('%d %B %Y', $news['publishedOn']); ?>
|
||||
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user