Changeset 6348
- Timestamp:
- 11/29/2007 05:03:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 )
Note: See TracChangeset
for help on using the changeset viewer.