From a35bb9df8c7816a6facf68ff963d5350999befe4 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 10 Jan 2007 11:53:05 +0000 Subject: WP Merge to rev 4714 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@839 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/admin-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wp-admin/admin-functions.php') diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 6e0d177..7a33aca 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -600,7 +600,7 @@ function checked( $checked, $current) { function return_categories_list( $parent = 0 ) { global $wpdb; - return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND ( link_count = 0 OR category_count != 0 ) ORDER BY category_count DESC" ); + return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND ( link_count = 0 OR category_count != 0 OR ( link_count = 0 AND category_count = 0 ) ) ORDER BY category_count DESC" ); } function sort_cats( $cat1, $cat2 ) { @@ -678,7 +678,7 @@ function dropdown_categories( $default = 0 ) { function return_link_categories_list( $parent = 0 ) { global $wpdb; - return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND (category_count = 0 OR link_count != 0) ORDER BY link_count DESC" ); + return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND ( category_count = 0 OR link_count != 0 OR ( link_count = 0 AND category_count = 0 ) ) ORDER BY link_count DESC" ); } function get_nested_link_categories( $default = 0, $parent = 0 ) { -- cgit