Make WordPress Core


Ignore:
Timestamp:
12/28/2005 12:42:42 AM (19 years ago)
Author:
ryan
Message:

Use API to delete comment so that counts are kept in sync. Props Mike Little. fixes #2159

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r3036 r3366  
    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;
Note: See TracChangeset for help on using the changeset viewer.