Add clean_category_cache() and capability checking. see #4107

git-svn-id: http://svn.automattic.com/wordpress/trunk@5203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-04-07 15:43:20 +00:00
parent c3508de5be
commit e874adadaa

View File

@ -1,7 +1,5 @@
<?php
error_reporting(E_ALL);
class WP_Categories_to_Tags {
var $categories_to_convert = array();
var $all_categories = array();
@ -114,6 +112,8 @@ class WP_Categories_to_Tags {
}
print '</ul>';
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 '<div class="narrow">';
print '<p>' __('Cheatin&#8217; uh?') . '</p>';
print '</div>';
} else {
switch ($step) {
case 1 :
$this->welcome();
break;
case 2:
$this->convert_them();
case 2 :
$this->convert_them();
break;
}
}
$this->footer();