diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php
index edc3d5dd19..c6c78c83c0 100644
--- a/wp-admin/admin-functions.php
+++ b/wp-admin/admin-functions.php
@@ -497,8 +497,8 @@ function page_rows( $parent = 0, $level = 0, $pages = 0 ) {
\n";
@@ -207,7 +203,7 @@ case 'deletecomment':
if ( ! $comment = get_comment($comment) )
die(sprintf(__('Oops, no comment with this ID.
Go back!'), 'post.php'));
- if (!user_can_delete_post_comments($user_ID, $commentdata['comment_post_ID']))
+ if ( !current_user_can('edit_post', $comment->comment_post_ID) )
die( __('You are not allowed to edit comments on this post.') );
wp_set_comment_status($comment->comment_ID, "delete");
@@ -238,7 +234,7 @@ case 'unapprovecomment':
if ( ! $comment = get_comment($comment) )
die(sprintf(__('Oops, no comment with this ID.
Go back!'), 'edit.php'));
- if ( !user_can_edit_post_comments($user_ID, $comment->comment_post_ID) )
+ if ( !current_user_can('edit_post', $comment->comment_post_ID) )
die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') );
wp_set_comment_status($comment->comment_ID, "hold");
@@ -258,7 +254,7 @@ case 'mailapprovecomment':
if ( ! $comment = get_comment($comment) )
die(sprintf(__('Oops, no comment with this ID.
Go back!'), 'edit.php'));
- if ( !user_can_edit_post_comments($user_ID, $comment->comment_post_ID) )
+ if ( !current_user_can('edit_post', $comment->comment_post_ID) )
die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
if ('1' != $comment->comment_approved) {
@@ -284,7 +280,7 @@ case 'approvecomment':
if ( ! $comment = get_comment($comment) )
die(sprintf(__('Oops, no comment with this ID.
Go back!'), 'edit.php'));
- if ( !user_can_edit_post_comments($user_ID, $commentdata['comment_post_ID']))
+ if ( !current_user_can('edit_post', $comment->comment_post_ID) )
die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
wp_set_comment_status($comment->comment_ID, "approve");
@@ -322,7 +318,7 @@ default:
View site »'), get_bloginfo('home')); ?>