Changeset 18435
- Timestamp:
- 07/11/2011 09:48:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r18110 r18435 322 322 if ( !$comment = get_comment( $id ) ) 323 323 die( (string) time() ); 324 if ( ! current_user_can( 'edit_post', $comment->comment_post_ID ) )324 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) 325 325 die('-1'); 326 326 … … 458 458 } 459 459 460 if ( ! current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) )460 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && ! current_user_can( 'moderate_comments' ) ) 461 461 die('-1'); 462 462 … … 613 613 ob_start(); 614 614 foreach ( $wp_list_table->items as $comment ) { 615 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) 616 continue; 615 617 get_comment( $comment ); 616 618 $wp_list_table->single_row( $comment ); … … 715 717 set_current_screen( 'edit-comments' ); 716 718 717 $comment_ post_ID = (int) $_POST['comment_post_ID'];718 if ( ! current_user_can( 'edit_ post', $comment_post_ID) )719 $comment_id = (int) $_POST['comment_ID']; 720 if ( ! current_user_can( 'edit_comment', $comment_id ) ) 719 721 die('-1'); 720 722 … … 722 724 die( __('Error: please type a comment.') ); 723 725 724 $comment_id = (int) $_POST['comment_ID'];725 726 $_POST['comment_status'] = $_POST['status']; 726 727 edit_comment();
Note: See TracChangeset
for help on using the changeset viewer.