summaryrefslogtreecommitdiffstats
path: root/wp-includes/category.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-25 12:01:00 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-25 12:01:00 +0000
commit65fdf82523ea65f8df0ff66d84ef1125f99a440d (patch)
tree44e9fa798b6e16682b0610345ec1d90397cc7fe8 /wp-includes/category.php
parent29d92778637bec6d154cb4557f52a458d0c265ad (diff)
downloadwordpress-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.php7
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();