Changeset 6348
- Timestamp:
- 11/29/07 05:03:25 (9 months ago)
- Files:
-
- trunk/wp-includes/comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/comment.php
r6173 r6348 498 498 499 499 function wp_update_comment_count($post_id) { 500 global $wpdb , $comment_count_cache;500 global $wpdb; 501 501 $post_id = (int) $post_id; 502 502 if ( !$post_id ) … … 508 508 $new = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = '$post_id' AND comment_approved = '1'"); 509 509 $wpdb->query("UPDATE $wpdb->posts SET comment_count = '$new' WHERE ID = '$post_id'"); 510 $comment_count_cache[$post_id] = $new;511 510 512 511 if ( 'page' == $post->post_type )
