[wp-cvs]
wordpress/wp-includes template-functions-category.php, 1.53, 1.54
Matthew Mullenweg
saxmatt at users.sourceforge.net
Fri Feb 11 03:43:59 GMT 2005
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13577/wp-includes
Modified Files:
template-functions-category.php
Log Message:
Don't show category counts from the future.
Index: template-functions-category.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-category.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** template-functions-category.php 7 Feb 2005 07:37:53 -0000 1.53
--- template-functions-category.php 11 Feb 2005 03:43:56 -0000 1.54
***************
*** 280,283 ****
--- 280,284 ----
}
if (!count($category_posts)) {
+ $now = current_time('mysql', 1);
$cat_counts = $wpdb->get_results(" SELECT cat_ID,
COUNT($wpdb->post2cat.post_id) AS cat_count
***************
*** 285,289 ****
INNER JOIN $wpdb->post2cat ON (cat_ID = category_id)
INNER JOIN $wpdb->posts ON (ID = post_id)
! WHERE post_status = 'publish' $exclusions
GROUP BY category_id");
if (! empty($cat_counts)) {
--- 286,291 ----
INNER JOIN $wpdb->post2cat ON (cat_ID = category_id)
INNER JOIN $wpdb->posts ON (ID = post_id)
! WHERE post_status = 'publish'
! AND post_date_gmt < '$now' $exclusions
GROUP BY category_id");
if (! empty($cat_counts)) {
More information about the cvs
mailing list