forked from ZwiiCMS-Team/ZwiiCMS
3.03
This commit is contained in:
parent
2171f1b6d6
commit
72b82aa071
@ -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');
|
||||
|
@ -31,7 +31,8 @@
|
||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||
<?php else: ?>
|
||||
<h3 id="comment">
|
||||
<?php $commentsNb = count($module::$comments); ?>
|
||||
<?php // $commentsNb = count($module::$comments); ?>
|
||||
<?php $commentsNb = $module::$comments['nbApproved']; ?>
|
||||
<?php $s = $commentsNb === 1 ? '': 's' ?>
|
||||
<?php echo $commentsNb > 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>
|
||||
</h3>
|
||||
|
Loading…
Reference in New Issue
Block a user