Changeset 11749 for trunk/wp-admin/comment.php
- Timestamp:
- 07/30/2009 01:39:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/comment.php
r11731 r11749 45 45 comment_footer_die( __('You are not allowed to edit comments on this post.') ); 46 46 47 if ( ' deleted' == $comment->comment_status )48 comment_footer_die( __('This comment has been deleted. Please move it out of the Trash if you want to edit it.') );47 if ( 'trash' == $comment->comment_status ) 48 comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); 49 49 50 50 $comment = get_comment_to_edit( $comment_id ); … … 167 167 break; 168 168 169 case 'trashcomment' : 170 case 'untrashcomment' : 171 $comment_id = absint( $_REQUEST['c'] ); 172 $noredir = isset($_REQUEST['noredir']); 173 174 if (!$comment = get_comment($comment_id)) 175 comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') ); 176 if (!current_user_can('edit_post', $comment->comment_post_ID )) 177 comment_footer_die( __('You are not allowed to edit comments on this post.') ); 178 179 if ($action == 'trashcomment') { 180 check_admin_referer( 'trash-comment_' . $comment_id ); 181 wp_trash_comment($comment_id); 182 } 183 else { 184 check_admin_referer( 'untrash-comment_' . $comment_id ); 185 wp_untrash_comment($comment_id); 186 } 187 188 if ('' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' )) 189 wp_redirect( wp_get_referer() ); 190 else if ('' != wp_get_original_referer() && false == $noredir) 191 wp_redirect(wp_get_original_referer()); 192 else 193 wp_redirect(admin_url('edit-comments.php')); 194 195 die; 196 break; 197 169 198 case 'unapprovecomment' : 170 199 $comment_id = absint( $_GET['c'] );
Note: See TracChangeset
for help on using the changeset viewer.