From 376e2d98aff34699722bbfa25e5e890878ad0af3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 29 Nov 2007 05:03:25 +0000 Subject: [PATCH] Remove old comment_count_cache variable. It's dead. git-svn-id: https://develop.svn.wordpress.org/trunk@6348 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 303e216df0..61ba398540 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -497,7 +497,7 @@ function wp_update_comment($commentarr) { function wp_update_comment_count($post_id) { - global $wpdb, $comment_count_cache; + global $wpdb; $post_id = (int) $post_id; if ( !$post_id ) return false; @@ -507,7 +507,6 @@ function wp_update_comment_count($post_id) { $old = (int) $post->comment_count; $new = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = '$post_id' AND comment_approved = '1'"); $wpdb->query("UPDATE $wpdb->posts SET comment_count = '$new' WHERE ID = '$post_id'"); - $comment_count_cache[$post_id] = $new; if ( 'page' == $post->post_type ) clean_page_cache( $post_id );