Ticket #2159: edit-comments.php.patch
File edit-comments.php.patch, 637 bytes (added by , 19 years ago) |
---|
-
wp-admin/edit-comments.php
44 44 $post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); 45 45 $authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") ); 46 46 if ( current_user_can('edit_post', $post_id) ) : 47 $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_ID = $comment");47 wp_set_comment_status($comment, "delete"); 48 48 ++$i; 49 49 endif; 50 50 endforeach;