WordPress.org

Make WordPress Core

Changeset 6348


Ignore:
Timestamp:
11/29/07 05:03:25 (6 years ago)
Author:
ryan
Message:

Remove old comment_count_cache variable. It's dead.

File:
1 edited

Legend:

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

    r6173 r6348  
    498498 
    499499function wp_update_comment_count($post_id) { 
    500     global $wpdb, $comment_count_cache; 
     500    global $wpdb; 
    501501    $post_id = (int) $post_id; 
    502502    if ( !$post_id ) 
     
    508508    $new = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = '$post_id' AND comment_approved = '1'"); 
    509509    $wpdb->query("UPDATE $wpdb->posts SET comment_count = '$new' WHERE ID = '$post_id'"); 
    510     $comment_count_cache[$post_id] = $new; 
    511510 
    512511    if ( 'page' == $post->post_type ) 
Note: See TracChangeset for help on using the changeset viewer.