diff core/modules/comment/src/Controller/CommentController.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 7a779792577d
children af1871eacc83
line wrap: on
line diff
--- a/core/modules/comment/src/Controller/CommentController.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/comment/src/Controller/CommentController.php	Thu Feb 28 13:21:36 2019 +0000
@@ -82,10 +82,10 @@
    * @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());