From ab87217af435644ed3cfdd5cab66132fa327e035 Mon Sep 17 00:00:00 2001
From: Dries <dries@buytaert.net>
Date: Thu, 20 Jun 2013 14:35:44 -0400
Subject: [PATCH] Issue #1999340 by chertzog, kim.pepper: Use Symfony Request
 for comment module.

---
 core/modules/comment/comment.admin.inc | 2 +-
 core/modules/comment/comment.module    | 6 +++---
 core/modules/comment/comment.pages.inc | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc
index b2a13a18e505..2bff10b5048c 100644
--- a/core/modules/comment/comment.admin.inc
+++ b/core/modules/comment/comment.admin.inc
@@ -20,7 +20,7 @@
  * @see comment_multiple_delete_confirm()
  */
 function comment_admin($type = 'new') {
-  $edit = $_POST;
+  $edit = Drupal::request()->request->all();
 
   if (isset($edit['operation']) && ($edit['operation'] == 'delete') && isset($edit['comments']) && $edit['comments']) {
     return drupal_get_form('comment_multiple_delete_confirm');
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index ec495127fb47..b0f71f14a655 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -430,12 +430,12 @@ function comment_permalink(Comment $comment) {
     $page = comment_get_display_page($comment->id(), $node->type);
 
     // @todo: Cleaner sub request handling.
-    $request = drupal_container()->get('request');
+    $request = Drupal::request();
     $subrequest = Request::create('/node/' . $node->nid, 'GET', $request->query->all(), $request->cookies->all(), array(), $request->server->all());
     $subrequest->query->set('page', $page);
     // @todo: Convert the pager to use the request object.
-    $_GET['page'] = $page;
-    return drupal_container()->get('http_kernel')->handle($subrequest, HttpKernelInterface::SUB_REQUEST);
+    $request->query->set('page', $page);
+    return Drupal::service('http_kernel')->handle($subrequest, HttpKernelInterface::SUB_REQUEST);
   }
   throw new NotFoundHttpException();
 }
diff --git a/core/modules/comment/comment.pages.inc b/core/modules/comment/comment.pages.inc
index 2fbcb58eb62b..9d7414b10dc7 100644
--- a/core/modules/comment/comment.pages.inc
+++ b/core/modules/comment/comment.pages.inc
@@ -38,7 +38,7 @@
 function comment_reply(EntityInterface $node, $pid = NULL) {
   // Set the breadcrumb trail.
   drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->label(), 'node/' . $node->nid)));
-  $op = isset($_POST['op']) ? $_POST['op'] : '';
+  $op = Drupal::request()->request->get('op');
   $build = array();
 
   // The user is previewing a comment prior to submitting it.
-- 
GitLab