From 8a682722d1b64ba299997ff3f6099db353fab43a Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 15 Jul 2005 11:12:16 +0000 Subject: Merge from WP SVN. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@27 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/admin-functions.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'wp-inst/wp-admin/admin-functions.php') 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 = "" . __('Edit') . "escape($category->cat_name)) . "')\" class='delete'>" . __('Delete') . ""; 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"); -- cgit