Changeset 7714 for trunk/wp-includes/comment.php
- Timestamp:
- 04/16/2008 11:45:39 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r7690 r7714 452 452 global $wpdb; 453 453 454 $count = wp_cache_get('comments', 'counts'); 455 456 if ( false !== $count ) 457 return $count; 458 454 459 $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} GROUP BY comment_approved", ARRAY_A ); 455 460 … … 465 470 } 466 471 467 return (object) $stats; 472 $stats = (object) $stats; 473 wp_cache_set('comments', $stats, 'counts'); 474 475 return $stats; 468 476 } 469 477
Note: See TracChangeset
for help on using the changeset viewer.