merge master 10306

This commit is contained in:
Fred Tempez 2020-11-18 15:27:14 +01:00
parent e7ae2d7e93
commit e4ff62f984
1 changed files with 7 additions and 7 deletions

View File

@ -497,7 +497,7 @@ class blog extends common {
$this->getUrl(0), $this->getUrl(0),
'posts', 'posts',
$articleId, [ $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), 'content' => $this->getInput('blogEditContent', null),
'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true), 'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true),
'hidePicture' => $this->getInput('blogEditHidePicture', helper::FILTER_BOOLEAN), 'hidePicture' => $this->getInput('blogEditHidePicture', helper::FILTER_BOOLEAN),
@ -586,7 +586,7 @@ class blog extends common {
'content' => $content, 'content' => $content,
'createdOn' => time(), 'createdOn' => time(),
'userId' => $this->getInput('blogArticleUserId'), '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 // Envoi d'une notification aux administrateurs
// Init tableau // Init tableau
@ -640,7 +640,7 @@ class blog extends common {
// Liste des pages // Liste des pages
self::$pages = $pagination['pages']; self::$pages = $pagination['pages'];
// Signature de l'article // 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'])){ switch ($this->getData(['user', $userIdArticle, 'signature'])){
case 1: case 1:
self::$articleSignature = $userIdArticle; self::$articleSignature = $userIdArticle;
@ -680,7 +680,7 @@ class blog extends common {
// Commentaires en fonction de la pagination // Commentaires en fonction de la pagination
for($i = $pagination['first']; $i < $pagination['last']; $i++) { for($i = $pagination['first']; $i < $pagination['last']; $i++) {
// Signatures des commentaires // 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) { if ($e) {
switch ($this->getData(['user', $e, 'signature'])){ switch ($this->getData(['user', $e, 'signature'])){
case 1: case 1:
@ -697,11 +697,11 @@ class blog extends common {
break; break;
} }
} else { } 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é // Données du commentaire si approuvé
if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment', $commentIds[$i],'approval']) === true ) { 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), $this->getUrl(1), 'comment', $commentIds[$i]]); self::$comments[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i]]);
} }
} }
// Valeurs en sortie // Valeurs en sortie