Index: /trunk/wp-admin/import/wp-cat2tag.php =================================================================== --- /trunk/wp-admin/import/wp-cat2tag.php (revision 5250) +++ /trunk/wp-admin/import/wp-cat2tag.php (revision 5251) @@ -17,13 +17,20 @@ global $wpdb; - $this->all_categories = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE (type & ~ " . TAXONOMY_TAG . ") != 0 ORDER BY cat_name ASC"); + $this->all_categories = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE (type & ~ " . TAXONOMY_TAG . ") != 0 AND category_count > 0 ORDER BY cat_name ASC"); } function welcome() { + $this->populate_all_categories(); + print '
' . __('Howdy! This converter allows you to selectively convert existing categories to tags. To get started, check the checkboxes of the categories you wish to be converted, then click the Convert button.') . '
'; - print '' . __('Keep in mind that if you convert a category with child categories, those child categories get their parent setting removed, so they\'re in the root.') . '
'; - - $this->categories_form(); + + if (count($this->all_categories) > 0) { + print '' . __('Howdy! This converter allows you to selectively convert existing categories to tags. To get started, check the checkboxes of the categories you wish to be converted, then click the Convert button.') . '
'; + print '' . __('Keep in mind that if you convert a category with child categories, those child categories get their parent setting removed, so they\'re in the root.') . '
'; + + $this->categories_form(); + } else { + print 'You have no categories to convert!
'; + } print '' . __('You are about to convert all categories to tags. Are you sure you want to continue?') . '
'; + + print ''; + + print '