From e4ff62f98472008f9fe58bc126334bbcb3cb894a Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 18 Nov 2020 15:27:14 +0100 Subject: [PATCH] merge master 10306 --- module/blog/blog.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index c7a6d574..9644febd 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -497,7 +497,7 @@ class blog extends common { $this->getUrl(0), 'posts', $articleId, [ - 'comment' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'comment']), + 'comment' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment']), 'content' => $this->getInput('blogEditContent', null), 'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true), 'hidePicture' => $this->getInput('blogEditHidePicture', helper::FILTER_BOOLEAN), @@ -586,7 +586,7 @@ class blog extends common { 'content' => $content, 'createdOn' => time(), 'userId' => $this->getInput('blogArticleUserId'), - 'approval' => !$this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'commentApproved']) // true commentaire publié false en attente de publication + 'approval' => !$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentApproved']) // true commentaire publié false en attente de publication ]]); // Envoi d'une notification aux administrateurs // Init tableau @@ -640,7 +640,7 @@ class blog extends common { // Liste des pages self::$pages = $pagination['pages']; // Signature de l'article - $userIdArticle = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']); + $userIdArticle = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']); switch ($this->getData(['user', $userIdArticle, 'signature'])){ case 1: self::$articleSignature = $userIdArticle; @@ -680,7 +680,7 @@ class blog extends common { // Commentaires en fonction de la pagination for($i = $pagination['first']; $i < $pagination['last']; $i++) { // Signatures des commentaires - $e = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment', $commentIds[$i],'userId']); + $e = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i],'userId']); if ($e) { switch ($this->getData(['user', $e, 'signature'])){ case 1: @@ -697,11 +697,11 @@ class blog extends common { break; } } else { - self::$commentsSignature[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment', $commentIds[$i],'author']); + self::$commentsSignature[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i],'author']); } // Données du commentaire si approuvé - if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment', $commentIds[$i],'approval']) === true ) { - self::$comments[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment', $commentIds[$i]]); + if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i],'approval']) === true ) { + self::$comments[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i]]); } } // Valeurs en sortie