From 72b82aa071e941b93799556c348c5e1243ed4fb1 Mon Sep 17 00:00:00 2001 From: Prof Langues Date: Mon, 5 Oct 2020 17:09:49 +0200 Subject: [PATCH] 3.03 --- module/blog/blog.php | 4 +++- module/blog/view/article/article.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 5bc68a5c..14fe38d1 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -89,7 +89,7 @@ class blog extends common { public static $users = []; - const BLOG_VERSION = '3.02.dev'; + const BLOG_VERSION = '3.03.dev'; /** * Édition @@ -568,6 +568,8 @@ class blog extends common { foreach( $commentsApproved as $key => $value){ if($value['approval']===false) unset($commentsApproved[$key]); } + // Ligne suivante si affichage du nombre total de commentaires approuvés sous l'article + self::$comments['nbApproved'] = count($commentsApproved); $commentIds = array_keys(helper::arrayCollumn($commentsApproved, 'createdOn', 'SORT_DESC')); // Pagination $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']),'#comment'); diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index f583f121..96ecd367 100644 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -31,7 +31,8 @@

Cet article ne reçoit pas de commentaire.

- + + 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>