WordPress.org

Make WordPress Core

Ticket #2159: edit-comments.php.patch

File edit-comments.php.patch, 637 bytes (added by MikeLittle, 8 years ago)

Patch to fix issue #2159

  • wp-admin/edit-comments.php

     
    4444                $post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); 
    4545                $authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") ); 
    4646                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"); 
    4848                        ++$i; 
    4949                endif; 
    5050        endforeach;