Changeset 15596 for trunk/wp-admin/comment.php
- Timestamp:
- 09/07/2010 11:35:28 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/comment.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/comment.php
r15132 r15596 61 61 comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'javascript:history.go(-1)') ); 62 62 63 if ( !current_user_can( 'edit_post', $comment->comment_post_ID) )64 comment_footer_die( __('You are not allowed to edit comments on this post.') );63 if ( !current_user_can( 'edit_comment', $comment_id ) ) 64 comment_footer_die( __('You are not allowed to edit this comment.') ); 65 65 66 66 if ( 'trash' == $comment->comment_approved ) … … 85 85 } 86 86 87 if ( !current_user_can( 'edit_ post', $comment->comment_post_ID ) ) {87 if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) { 88 88 wp_redirect( admin_url('edit-comments.php?error=2') ); 89 89 die(); … … 185 185 <?php wp_nonce_field( $nonce_action ); ?> 186 186 <input type='hidden' name='action' value='<?php echo esc_attr($formaction); ?>' /> 187 <input type='hidden' name='p' value='<?php echo esc_attr($comment->comment_post_ID); ?>' />188 187 <input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' /> 189 188 <input type='hidden' name='noredir' value='1' /> … … 213 212 if ( !$comment = get_comment($comment_id) ) 214 213 comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') ); 215 if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )214 if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) 216 215 comment_footer_die( __('You are not allowed to edit comments on this post.') ); 217 216
Note: See TracChangeset
for help on using the changeset viewer.