Only used published posts.

git-svn-id: https://develop.svn.wordpress.org/trunk@1280 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dougal Campbell 2004-05-14 19:44:23 +00:00
parent 3caaec0bc7
commit 17ab4425d2
1 changed files with 2 additions and 2 deletions

View File

@ -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;