Add clean_category_cache() and capability checking. see #4107

git-svn-id: https://develop.svn.wordpress.org/trunk@5203 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-04-07 15:43:20 +00:00
parent c113ddaa1f
commit 143c7eb4c1

View File

@ -1,7 +1,5 @@
<?php <?php
error_reporting(E_ALL);
class WP_Categories_to_Tags { class WP_Categories_to_Tags {
var $categories_to_convert = array(); var $categories_to_convert = array();
var $all_categories = array(); var $all_categories = array();
@ -114,6 +112,8 @@ class WP_Categories_to_Tags {
} }
print '</ul>'; print '</ul>';
clean_category_cache();
} }
function init() { function init() {
@ -125,13 +125,20 @@ class WP_Categories_to_Tags {
$this->header(); $this->header();
switch ($step) { if (!current_user_can('manage_categories') || !current_user_can('manage_tags')) {
case 1: print '<div class="narrow">';
$this->welcome(); print '<p>' __('Cheatin&#8217; uh?') . '</p>';
print '</div>';
} else {
switch ($step) {
case 1 :
$this->welcome();
break; break;
case 2:
$this->convert_them(); case 2 :
$this->convert_them();
break; break;
}
} }
$this->footer(); $this->footer();