fix for the bug that made list_cats show empty categories, thanks to brux

git-svn-id: http://svn.automattic.com/wordpress/trunk@1278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-05-14 16:20:38 +00:00
parent ce885b68f3
commit 620accf191
1 changed files with 2 additions and 2 deletions

View File

@ -297,8 +297,8 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
$cat_counts = $wpdb->get_results(" SELECT cat_ID,
COUNT($tablepost2cat.post_id) AS cat_count
FROM $tablecategories
LEFT JOIN $tablepost2cat ON (cat_ID = category_id)
LEFT JOIN $tableposts ON (ID = post_id)
INNER JOIN $tablepost2cat ON (cat_ID = category_id)
INNER JOIN $tableposts ON (ID = post_id)
WHERE 1 = 1 $exclusions
GROUP BY category_id");
foreach ($cat_counts as $cat_count) {