Bug that was causing duplicate queries.

git-svn-id: https://develop.svn.wordpress.org/trunk@1183 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-04-26 19:12:33 +00:00
parent da048b308a
commit 590223e506
1 changed files with 1 additions and 1 deletions

View File

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