From 812ad5dbc3aec5a80d054ec916d12925c2346c8a Mon Sep 17 00:00:00 2001 From: emc3 Date: Fri, 14 May 2004 19:44:23 +0000 Subject: [PATCH] Only used published posts. git-svn-id: http://svn.automattic.com/wordpress/trunk@1280 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-category.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index 1cf32eda0e..34c767e0f6 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -299,7 +299,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde FROM $tablecategories INNER JOIN $tablepost2cat ON (cat_ID = category_id) INNER JOIN $tableposts ON (ID = post_id) - WHERE 1 = 1 $exclusions + WHERE post_status = 'publish' $exclusions GROUP BY category_id"); foreach ($cat_counts as $cat_count) { $category_posts["$cat_count->cat_ID"] = $cat_count->cat_count; @@ -312,7 +312,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde FROM $tablecategories LEFT JOIN $tablepost2cat ON (cat_ID = category_id) LEFT JOIN $tableposts ON (ID = post_id) - WHERE 1 = 1 $exclusions + WHERE post_status = 'publish' $exclusions GROUP BY category_id"); foreach ($cat_dates as $cat_date) { $category_lastday["$cat_date->cat_ID"] = $cat_date->lastday;