From 590223e5067266ec80f181fbd46c7849d90b95d8 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 26 Apr 2004 19:12:33 +0000 Subject: [PATCH] Bug that was causing duplicate queries. git-svn-id: https://develop.svn.wordpress.org/trunk@1183 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index 2eec919c45..8a8b828d4b 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -272,7 +272,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde $categories = $wpdb->get_results($query); } - if (intval($hide_empty) == 1 || intval($optioncount) == 1) { + if (intval($hide_empty) == 1 && intval($optioncount) == 1) { $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)