forked from ZwiiCMS-Team/ZwiiCMS
3.04.dev
This commit is contained in:
parent
72b82aa071
commit
680af4c652
@ -649,7 +649,8 @@ class init extends common {
|
||||
'author' => 'Rémi',
|
||||
'content' => 'Article bien rédigé et très pertinent, bravo !',
|
||||
'createdOn' => 1421748000,
|
||||
'userId' => ''
|
||||
'userId' => '',
|
||||
'approval' => true
|
||||
]
|
||||
],
|
||||
'content' => '<p>Et eodem impetu Domitianum praecipitem per scalas itidem funibus constrinxerunt, eosque coniunctos per ampla spatia civitatis acri raptavere discursu. iamque artuum et membrorum divulsa conpage superscandentes corpora mortuorum ad ultimam truncata deformitatem velut exsaturati mox abiecerunt in flumen.</p><p>Ex his quidam aeternitati se commendari posse per statuas aestimantes eas ardenter adfectant quasi plus praemii de figmentis aereis sensu carentibus adepturi, quam ex conscientia honeste recteque factorum, easque auro curant inbracteari, quod Acilio Glabrioni delatum est primo, cum consiliis armisque regem superasset Antiochum. quam autem sit pulchrum exigua haec spernentem et minima ad ascensus verae gloriae tendere longos et arduos, ut memorat vates Ascraeus, Censorius Cato monstravit. qui interrogatus quam ob rem inter multos... statuam non haberet malo inquit ambigere bonos quam ob rem id non meruerim, quam quod est gravius cur inpetraverim mussitare.</p><p>Latius iam disseminata licentia onerosus bonis omnibus Caesar nullum post haec adhibens modum orientis latera cuncta vexabat nec honoratis parcens nec urbium primatibus nec plebeiis.</p>',
|
||||
|
@ -41,6 +41,8 @@ class blog extends common {
|
||||
public static $editCommentSignature = '';
|
||||
|
||||
public static $comments = [];
|
||||
|
||||
public static $nbCommentsApproved = 0;
|
||||
|
||||
public static $commentsDelete;
|
||||
|
||||
@ -89,7 +91,7 @@ class blog extends common {
|
||||
|
||||
public static $users = [];
|
||||
|
||||
const BLOG_VERSION = '3.03.dev';
|
||||
const BLOG_VERSION = '3.04.dev';
|
||||
|
||||
/**
|
||||
* Édition
|
||||
@ -569,7 +571,7 @@ class blog extends common {
|
||||
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);
|
||||
self::$nbCommentsApproved = count($commentsApproved);
|
||||
$commentIds = array_keys(helper::arrayCollumn($commentsApproved, 'createdOn', 'SORT_DESC'));
|
||||
// Pagination
|
||||
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']),'#comment');
|
||||
|
@ -31,8 +31,8 @@
|
||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||
<?php else: ?>
|
||||
<h3 id="comment">
|
||||
<?php // $commentsNb = count($module::$comments); ?>
|
||||
<?php $commentsNb = $module::$comments['nbApproved']; ?>
|
||||
<?php //$commentsNb = count($module::$comments); ?>
|
||||
<?php $commentsNb = $module::$nbCommentsApproved; ?>
|
||||
<?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