From 82e793ed182137942acffe8a06eca992c8da4fae Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 29 Jul 2010 21:54:41 +0000 Subject: [PATCH] Ensure we're checking when looking for is_super_admin() in map_meta_cap(). Bump DB version. git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@15478 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 3f782140e1..3773b4a857 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -812,7 +812,7 @@ function map_meta_cap( $cap, $user_id ) { // Fall through case 'edit_users': // If multisite these caps are allowed only for super admins. - if ( is_multisite() && !is_super_admin() ) + if ( is_multisite() && !is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; else $caps[] = 'edit_users'; // Explicit due to primitive fall through @@ -991,7 +991,7 @@ function map_meta_cap( $cap, $user_id ) { $caps[] = 'read_private_pages'; break; case 'unfiltered_upload': - if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin() ) ) + if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) ) ) $caps[] = $cap; else $caps[] = 'do_not_allow'; @@ -1028,7 +1028,7 @@ function map_meta_cap( $cap, $user_id ) { case 'delete_user': case 'delete_users': // If multisite these caps are allowed only for super admins. - if ( is_multisite() && !is_super_admin() ) + if ( is_multisite() && !is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; else $caps[] = $cap; diff --git a/wp-includes/version.php b/wp-includes/version.php index 607570e216..731ce598be 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -15,7 +15,7 @@ $wp_version = '3.0.1'; * * @global int $wp_db_version */ -$wp_db_version = 15260; +$wp_db_version = 15477; /** * Holds the TinyMCE version