From 7ab0bf54e9c64fb039feb7b97066d0a92dde55e0 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 29 Aug 2007 22:47:07 +0000 Subject: [PATCH] Don't convert category to tag if tag of the same name already exists. fixes #4864 git-svn-id: https://develop.svn.wordpress.org/trunk@5980 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/import/wp-cat2tag.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/wp-admin/import/wp-cat2tag.php b/wp-admin/import/wp-cat2tag.php index 5f2869e153..1c5d43a1c9 100644 --- a/wp-admin/import/wp-cat2tag.php +++ b/wp-admin/import/wp-cat2tag.php @@ -96,10 +96,11 @@ class WP_Categories_to_Tags { function convert_them() { global $wpdb; - if (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) { + if ( (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) && empty($this->categories_to_convert)) { print '
'; print '

' . sprintf(__('Uh, oh. Something didn\'t work. Please try again.'), 'admin.php?import=wp-cat2tag') . '

'; print '
'; + return; } @@ -109,16 +110,22 @@ class WP_Categories_to_Tags { print '