blog 3.02.dev

This commit is contained in:
Fred Tempez 2020-10-04 12:21:46 +02:00
parent e181178a54
commit 0b66f0ab2e

View File

@ -89,7 +89,7 @@ class blog extends common {
public static $users = []; public static $users = [];
const BLOG_VERSION = '3.01.dev'; const BLOG_VERSION = '3.02.dev';
/** /**
* Édition * Édition
@ -563,8 +563,12 @@ class blog extends common {
} }
} }
// Ids des commentaires par ordre de publication // Ids des commentaires approuvés par ordre de publication
$commentIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment']), 'createdOn', 'SORT_DESC')); $commentsApproved = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment']);
foreach( $commentsApproved as $key => $value){
if($value['approval']===false) unset($commentsApproved[$key]);
}
$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');
// Liste des pages // Liste des pages