diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index c39fcff..b23fb7c 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -247,11 +247,8 @@ function comment_menu() { // so we don't end up loading it twice (in the page and access callback). $items['comment/%comment/edit'] = array( 'title' => 'Edit', - 'page callback' => 'comment_edit_page', - 'page arguments' => array(1), - 'access callback' => 'entity_page_access', - 'access arguments' => array(1, 'update'), 'type' => MENU_LOCAL_TASK, + 'route_name' => 'comment_edit_page', ); $items['comment/%comment/approve'] = array( 'title' => 'Approve', diff --git a/core/modules/comment/comment.routing.yml b/core/modules/comment/comment.routing.yml new file mode 100644 index 0000000..058cbc4 --- /dev/null +++ b/core/modules/comment/comment.routing.yml @@ -0,0 +1,6 @@ +comment_edit_page: + pattern: 'comment/{comment}/edit' + defaults: + _entity_form: comment.default + requirements: + _entity_access: comment.update \ No newline at end of file