From 7b9518dbed71aa0dd12f9eb9b6ff75688fc87d67 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Fri, 14 May 2004 16:20:38 +0000 Subject: [PATCH] fix for the bug that made list_cats show empty categories, thanks to brux git-svn-id: https://develop.svn.wordpress.org/trunk@1278 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 13686ef7e4..1cf32eda0e 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -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) {