WordPress.org

Make WordPress Core

Changeset 3271


Ignore:
Timestamp:
12/05/05 05:31:27 (8 years ago)
Author:
ryan
Message:

Decrease comment count only when deleting approved comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-functions.php

    r3193 r3271  
    202202 
    203203    $post_id = $comment->comment_post_ID; 
    204     if ( $post_id ) 
     204    if ( $post_id && $comment->comment_approved == 1 ) 
    205205        $wpdb->query( "UPDATE $wpdb->posts SET comment_count = comment_count - 1 WHERE ID = '$post_id'" ); 
    206206 
Note: See TracChangeset for help on using the changeset viewer.