diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index ab77162..9054c40 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1975,9 +1975,9 @@ function comment_save_action(Comment $comment) { */ function comment_delete_action(Comment $comment) { $subject = $comment->subject->value; - comment_delete($comment->cid->value); + comment_delete($comment->id()); cache_invalidate_tags(array('content' => TRUE)); - watchdog('action', 'Deleted comment %subject.', array('%title' => $subject)); + watchdog('action', 'Deleted comment %subject.', array('%subject' => $subject)); } /** diff --git a/core/modules/comment/config/views.view.comments.yml b/core/modules/comment/config/views.view.comments.yml index a7c42ec..35beb4c 100644 --- a/core/modules/comment/config/views.view.comments.yml +++ b/core/modules/comment/config/views.view.comments.yml @@ -552,6 +552,7 @@ display: hide_alter_empty: '1' include_exclude: include selected_actions: + comment_delete_action: comment_delete_action comment_publish_action: comment_publish_action plugin_id: action_bulk_form subject: @@ -866,6 +867,7 @@ display: hide_alter_empty: '1' include_exclude: include selected_actions: + comment_delete_action: comment_delete_action comment_unpublish_action: comment_unpublish_action plugin_id: action_bulk_form subject: diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php index 0b0282a..39f15be 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php @@ -93,7 +93,7 @@ function testCommentDeleteAction() { // Delete a comment. comment_delete_action($comment); - $comment = comment_load($comment->cid->value); + $comment = comment_load($comment->id()); $this->assertTrue(empty($comment), 'Comment was deleted'); $this->assertWatchdogMessage('Deleted comment %subject.', array('%subject' => $subject), 'Found watchdog message'); $this->clearWatchdog();