diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-15 11:12:16 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-15 11:12:16 +0000 |
| commit | 8a682722d1b64ba299997ff3f6099db353fab43a (patch) | |
| tree | f5e794047b9e92676e44100cedb7848297a9600b /wp-inst/wp-admin/admin-functions.php | |
| parent | eb69639d667f0c15130e26e79e06fd6f891f3936 (diff) | |
| download | wordpress-mu-8a682722d1b64ba299997ff3f6099db353fab43a.tar.gz wordpress-mu-8a682722d1b64ba299997ff3f6099db353fab43a.tar.xz wordpress-mu-8a682722d1b64ba299997ff3f6099db353fab43a.zip | |
Merge from WP SVN.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@27 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/admin-functions.php')
| -rw-r--r-- | wp-inst/wp-admin/admin-functions.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php index 73fb915..2d0b0e6 100644 --- a/wp-inst/wp-admin/admin-functions.php +++ b/wp-inst/wp-admin/admin-functions.php @@ -444,9 +444,7 @@ function dropdown_categories($default = 0) { // Dandy new recursive multiple category stuff. function cat_rows($parent = 0, $level = 0, $categories = 0) { - global $wpdb, $class, $current_user; - - $user_level = $current_user->user_level; + global $wpdb, $class; if ( !$categories ) $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name"); @@ -457,7 +455,7 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { $category->cat_name = wp_specialchars($category->cat_name); $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('— ', $level); - if ( $user_level > 3 ) + if ( current_user_can('manage_categories') ) $edit = "<a href='categories.php?action=edit&cat_ID=$category->cat_ID' class='edit'>" . __('Edit') . "</a></td><td><a href='categories.php?action=delete&cat_ID=$category->cat_ID' onclick=\"return confirm('". sprintf(__("You are about to delete the category \'%s\'. All of its posts will go to the default category.\\n \'OK\' to delete, \'Cancel\' to stop."), $wpdb->escape($category->cat_name)) . "')\" class='delete'>" . __('Delete') . "</a>"; else $edit = ''; @@ -477,7 +475,7 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { } function page_rows( $parent = 0, $level = 0, $pages = 0 ) { - global $wpdb, $class, $user_level, $post; + global $wpdb, $class, $post; if (!$pages) $pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' ORDER BY menu_order"); |
