diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-07-25 12:01:00 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-07-25 12:01:00 +0000 |
commit | 65fdf82523ea65f8df0ff66d84ef1125f99a440d (patch) | |
tree | 44e9fa798b6e16682b0610345ec1d90397cc7fe8 /wp-includes/category.php | |
parent | 29d92778637bec6d154cb4557f52a458d0c265ad (diff) | |
download | wordpress-mu-65fdf82523ea65f8df0ff66d84ef1125f99a440d.tar.gz wordpress-mu-65fdf82523ea65f8df0ff66d84ef1125f99a440d.tar.xz wordpress-mu-65fdf82523ea65f8df0ff66d84ef1125f99a440d.zip |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@707 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/category.php')
-rw-r--r-- | wp-includes/category.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wp-includes/category.php b/wp-includes/category.php index 30392a7..3127482 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -67,12 +67,11 @@ function &get_categories($args = '') { $exclusions = apply_filters('list_cats_exclusions', $exclusions, $r ); $where .= $exclusions; - $having = ''; if ( $hide_empty ) { if ( 'link' == $type ) - $having = 'HAVING link_count > 0'; + $where .= ' AND link_count > 0'; else - $having = 'HAVING category_count > 0'; + $where .= ' AND category_count > 0'; } if ( !empty($number) ) @@ -80,7 +79,7 @@ function &get_categories($args = '') { else $number = ''; - $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE $where $having ORDER BY $orderby $order $number"); + $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE $where ORDER BY $orderby $order $number"); if ( empty($categories) ) return array(); |