Bug that was causing duplicate queries.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bd369e3899
commit
788f328d6b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue