From 5c07742cd35fe81c6bc6ce104195226bf112d57d Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 29 Nov 2007 05:03:25 +0000 Subject: [PATCH] Remove old comment_count_cache variable. It's dead. git-svn-id: http://svn.automattic.com/wordpress/trunk@6348 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 );