From e874adadaab23d620c491bbcbde68c21009df547 Mon Sep 17 00:00:00 2001 From: rob1n Date: Sat, 7 Apr 2007 15:43:20 +0000 Subject: [PATCH] Add clean_category_cache() and capability checking. see #4107 git-svn-id: http://svn.automattic.com/wordpress/trunk@5203 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/import/wp-cat2tag.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/wp-admin/import/wp-cat2tag.php b/wp-admin/import/wp-cat2tag.php index b10edb439e..0ba3a2724d 100644 --- a/wp-admin/import/wp-cat2tag.php +++ b/wp-admin/import/wp-cat2tag.php @@ -1,7 +1,5 @@ '; + + clean_category_cache(); } function init() { @@ -125,13 +125,20 @@ class WP_Categories_to_Tags { $this->header(); - switch ($step) { - case 1: - $this->welcome(); + if (!current_user_can('manage_categories') || !current_user_can('manage_tags')) { + print '
'; + print '

' __('Cheatin’ uh?') . '

'; + print '
'; + } else { + switch ($step) { + case 1 : + $this->welcome(); break; - case 2: - $this->convert_them(); + + case 2 : + $this->convert_them(); break; + } } $this->footer();