diff --git a/module/blog/blog.php b/module/blog/blog.php index 1c7d0fa7..23690d0f 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -278,10 +278,16 @@ class blog extends common { 'value' => $comment['approval'] === true ? 'A' : 'R' ]); } + //Date et heure + $gdh = mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y', $comment['createdOn']), 'UTF-8', true) + ? \PHP81_BC\strftime('%d %B %Y ', $comment['createdOn']) + : utf8_encode(\PHP81_BC\strftime('%d %B %Y', $comment['createdOn'])); + $gdh .= ' - '; + $gdh .= mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $comment['createdOn']), 'UTF-8', true) + ? \PHP81_BC\strftime('%H:%M', $comment['createdOn']) + : utf8_encode(\PHP81_BC\strftime('%H:%M', $comment['createdOn'])); self::$comments[] = [ - mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true) - ? \PHP81_BC\strftime('%d %B %Y - %H:%M', $comment['createdOn']) - : utf8_encode(\PHP81_BC\strftime('%d %B %Y - %H:%M', $comment['createdOn'])), + $gdh, $comment['content'], $comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'], $buttonApproval, diff --git a/module/blog/view/index/index.php b/module/blog/view/index/index.php index 292182d4..6707f704 100644 --- a/module/blog/view/index/index.php +++ b/module/blog/view/index/index.php @@ -13,7 +13,7 @@ $this->makeThumb( self::FILE_DIR . 'source/' . $article['picture'], self::FILE_DIR . 'thumb/' . $thumb, self::THUMBS_WIDTH); - } + } ?> <?php echo $article['picture']; ?> @@ -36,9 +36,16 @@
- +

'), 0, 400); ?>...