3.03
This commit is contained in:
parent
2171f1b6d6
commit
72b82aa071
@ -89,7 +89,7 @@ class blog extends common {
|
|||||||
|
|
||||||
public static $users = [];
|
public static $users = [];
|
||||||
|
|
||||||
const BLOG_VERSION = '3.02.dev';
|
const BLOG_VERSION = '3.03.dev';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Édition
|
* Édition
|
||||||
@ -568,6 +568,8 @@ class blog extends common {
|
|||||||
foreach( $commentsApproved as $key => $value){
|
foreach( $commentsApproved as $key => $value){
|
||||||
if($value['approval']===false) unset($commentsApproved[$key]);
|
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'));
|
$commentIds = array_keys(helper::arrayCollumn($commentsApproved, 'createdOn', 'SORT_DESC'));
|
||||||
// Pagination
|
// Pagination
|
||||||
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']),'#comment');
|
$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>
|
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<h3 id="comment">
|
<h3 id="comment">
|
||||||
<?php $commentsNb = count($module::$comments); ?>
|
<?php // $commentsNb = count($module::$comments); ?>
|
||||||
|
<?php $commentsNb = $module::$comments['nbApproved']; ?>
|
||||||
<?php $s = $commentsNb === 1 ? '': 's' ?>
|
<?php $s = $commentsNb === 1 ? '': 's' ?>
|
||||||
<?php echo $commentsNb > 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>
|
<?php echo $commentsNb > 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>
|
||||||
</h3>
|
</h3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user