WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/07/2011 04:17:05 PM (9 years ago)
Author:
ryan
Message:

Use edit_comment cap. Props casben79. fixes #16129

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/comment.php

    r15564 r17232  
    3333 */
    3434function edit_comment() {
    35     $comment_post_ID = (int) $_POST['comment_post_ID'];
    3635
    37     if (!current_user_can( 'edit_post', $comment_post_ID ))
    38         wp_die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.' ) );
     36    if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
     37        wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
    3938
    4039    $_POST['comment_author'] = $_POST['newcomment_author'];
Note: See TracChangeset for help on using the changeset viewer.