diff --git a/core/core.php b/core/core.php index 3b0a6312..0c8d4eb5 100644 --- a/core/core.php +++ b/core/core.php @@ -1483,24 +1483,24 @@ class common { foreach ($pageList as $parentKey => $parent) { //La page a une galerie if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) { - $articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent]), 'publishedOn', 'SORT_DESC')); + $articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent,'posts']), 'publishedOn', 'SORT_DESC')); foreach ($articleIds as $key => $article) { // Droits les deux groupes - $this->setData(['module', $parent, $article,'editConsent', 3]); + $this->setData(['module', $parent, 'posts', $article,'editConsent', 3]); // Limite de taille 500 - $this->setData(['module', $parent, $article,'commentMaxlength', '500']); + $this->setData(['module', $parent, 'posts', $article,'commentMaxlength', '500']); // Pas d'approbation des commentaires - $this->setData(['module', $parent, $article,'commentApproved', false ]); + $this->setData(['module', $parent, 'posts', $article,'commentApproved', false ]); // pas de notification - $this->setData(['module', $parent, $article,'commentNotification', false ]); + $this->setData(['module', $parent, 'posts', $article,'commentNotification', false ]); // groupe de notification - $this->setData(['module', $parent, $article,'commentGroupNotification', 3 ]); + $this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]); } // Traitement des commentaires - if ( is_array($this->getData(['module', $parent, $article,'comment'])) ) { - foreach($this->getData(['module', $parent, $article,'comment']) as $commentId => $comment) { + if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) { + foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) { // Approbation - $this->setData(['module', $parent, $article,'comment', $commentId, 'approval', true ]); + $this->setData(['module', $parent, 'posts', $article,'comment', $commentId, 'approval', true ]); } } } diff --git a/module/blog/blog.php b/module/blog/blog.php index 9644febd..f49108a9 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -152,7 +152,7 @@ class blog extends common { } // Incrémente l'id de l'article $articleId = helper::increment($this->getInput('blogAddTitle', helper::FILTER_ID), $this->getData(['page'])); - $articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0)])); + $articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0),'posts'])); $articleId = helper::increment($articleId, array_keys(self::$actions)); // Crée l'article $this->setData(['module', @@ -354,7 +354,7 @@ class blog extends common { */ public function config() { // Ids des articles par ordre de publication - $articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC')); + $articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0),'posts']), 'publishedOn', 'SORT_DESC')); // Gestion des droits d'accès $filterData=[]; foreach ($articleIds as $key => $value) {