From b75bf365f8b89f26fb7932b2cb72c5f9e1a68e16 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 26 May 2007 18:59:58 +0000 Subject: [PATCH] cat2tag fixes. see #4189 git-svn-id: https://develop.svn.wordpress.org/trunk@5554 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/import/wp-cat2tag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/import/wp-cat2tag.php b/wp-admin/import/wp-cat2tag.php index 06add67cef..bb69eb2c31 100644 --- a/wp-admin/import/wp-cat2tag.php +++ b/wp-admin/import/wp-cat2tag.php @@ -119,7 +119,7 @@ class WP_Categories_to_Tags { $category =& get_category($cat_id); // Set the category itself to $type from above - $wpdb->query("UPDATE $wpdb->term_taxonomy SET taxonomy = '$type' WHERE term_id = '{$category->term_id}' AND taxonomy = 'category'"); + $wpdb->query("UPDATE $wpdb->term_taxonomy SET taxonomy = 'post_tag' WHERE term_id = '{$category->term_id}' AND taxonomy = 'category'"); // Set all parents to 0 (root-level) if their parent was the converted tag $wpdb->query("UPDATE $wpdb->term_taxonomy SET parent = 0 WHERE parent = '{$category->term_id}' AND taxonomy = 'category'"); @@ -153,7 +153,7 @@ class WP_Categories_to_Tags { function convert_all() { global $wpdb; - $wpdb->query("UPDATE $wpdb->term_taxonomy SET taxonomy = '$type', parent = 0 WHERE taxonomy = 'category'"); + $wpdb->query("UPDATE $wpdb->term_taxonomy SET taxonomy = 'post_tag', parent = 0 WHERE taxonomy = 'category'"); clean_category_cache($category->term_id); }