X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FController%2FCommentController.php;fp=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FController%2FCommentController.php;h=ad821e333df1da4eb354e6918cade34d274f6158;hp=560233889cccc69f6e042f56a2d2ff927d2fd846;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/comment/src/Controller/CommentController.php b/web/core/modules/comment/src/Controller/CommentController.php index 560233889..ad821e333 100644 --- a/web/core/modules/comment/src/Controller/CommentController.php +++ b/web/core/modules/comment/src/Controller/CommentController.php @@ -82,10 +82,10 @@ class CommentController extends ControllerBase { * @return \Symfony\Component\HttpFoundation\RedirectResponse */ public function commentApprove(CommentInterface $comment) { - $comment->setPublished(TRUE); + $comment->setPublished(); $comment->save(); - drupal_set_message($this->t('Comment approved.')); + $this->messenger()->addStatus($this->t('Comment approved.')); $permalink_uri = $comment->permalink(); $permalink_uri->setAbsolute(); return new RedirectResponse($permalink_uri->toString());