diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index f436966..48e9b73 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -234,11 +234,7 @@ function comment_menu() { ); $items['comment/reply/%node'] = array( 'title' => 'Add new comment', - 'page callback' => 'comment_reply', - 'page arguments' => array(2), - 'access callback' => 'node_access', - 'access arguments' => array('view', 2), - 'file' => 'comment.pages.inc', + 'route_name' => 'comment_reply', ); return $items; diff --git a/core/modules/comment/comment.routing.yml b/core/modules/comment/comment.routing.yml index 6118bd2..74d4c88 100644 --- a/core/modules/comment/comment.routing.yml +++ b/core/modules/comment/comment.routing.yml @@ -24,6 +24,6 @@ comment_reply: pattern: 'comment/reply/{node}/{pid}' defaults: _content: '\Drupal\comment\Controller\CommentController::getReply' - pid : ~ + pid : ~ requirements: - _entity_access: node.view + _entity_access: 'node.view' diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php index b847611..5ca7a51 100644 --- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php +++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php @@ -166,7 +166,7 @@ public function commentPermalink(Request $request, CommentInterface $comment) { * @param \Symfony\Component\HttpFoundation\Request $request * The current request object containing the search string. * - * @return array|Symfony\Component\HttpFoundation\RedirectResponse + * @return array|\Symfony\Component\HttpFoundation\RedirectResponse * One of the following: * - An associative array containing: * - An array for rendering the node or parent comment.