Block editing of sites in a network other than the current one. Props wpmuguru. see #14185 for 3.1

git-svn-id: http://svn.automattic.com/wordpress/trunk@15385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-07-12 15:01:25 +00:00
parent 44e222d5ae
commit 11e51b7e0e
1 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,9 @@ switch ( $action ) {
$blog_prefix = $wpdb->get_blog_prefix( $id );
$options = $wpdb->get_results( "SELECT * FROM {$blog_prefix}options WHERE option_name NOT LIKE '\_%' AND option_name NOT LIKE '%user_roles'" );
$details = get_blog_details( $id );
if ( $details->site_id != $wpdb->siteid )
wp_die( __( 'You do not have permission to access this page.' ) );
$editblog_roles = get_blog_option( $id, "{$blog_prefix}user_roles" );
$is_main_site = is_main_site( $id );
?>