summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-includes/comment-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-12-05 15:29:53 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-12-05 15:29:53 +0000
commit3055390b6908c8335d154dd8e4dfa374b7fa3783 (patch)
treeed05c0516b4cf40831ae49a747946fcfd9162b7f /wp-inst/wp-includes/comment-functions.php
parentfba798a103256f5f400cb1a1dcb9cc5b45cf8166 (diff)
downloadwordpress-mu-3055390b6908c8335d154dd8e4dfa374b7fa3783.tar.gz
wordpress-mu-3055390b6908c8335d154dd8e4dfa374b7fa3783.tar.xz
wordpress-mu-3055390b6908c8335d154dd8e4dfa374b7fa3783.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@461 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/comment-functions.php')
-rw-r--r--wp-inst/wp-includes/comment-functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-inst/wp-includes/comment-functions.php b/wp-inst/wp-includes/comment-functions.php
index 5f52018..3bafa8c 100644
--- a/wp-inst/wp-includes/comment-functions.php
+++ b/wp-inst/wp-includes/comment-functions.php
@@ -201,7 +201,7 @@ function wp_delete_comment($comment_id) {
return false;
$post_id = $comment->comment_post_ID;
- if ( $post_id )
+ if ( $post_id && $comment->comment_approved == 1 )
$wpdb->query( "UPDATE $wpdb->posts SET comment_count = comment_count - 1 WHERE ID = '$post_id'" );
do_action('wp_set_comment_status', $comment_id, 'delete');