From 5e09c87f1dc73468bee99e8c3c6eef1b546920dc Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 8 Mar 2011 22:56:43 +0000 Subject: [PATCH] Anchor network and user admins at the network domain and path rather than at the main site. Makes the redirects consistent with network_admin_url(). fixes #16652 for 3.1 git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17511 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/admin.php | 2 +- wp-admin/user/admin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/network/admin.php b/wp-admin/network/admin.php index d4374de09e..145c25d1bf 100644 --- a/wp-admin/network/admin.php +++ b/wp-admin/network/admin.php @@ -15,7 +15,7 @@ require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' ); if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); -if ( ! is_main_site() ) { +if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) { wp_redirect( network_admin_url() ); exit; } diff --git a/wp-admin/user/admin.php b/wp-admin/user/admin.php index 4b8423f404..42850f4b25 100644 --- a/wp-admin/user/admin.php +++ b/wp-admin/user/admin.php @@ -16,7 +16,7 @@ if ( ! is_multisite() ) { exit; } -if ( ! is_main_site() ) { +if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) { wp_redirect( user_admin_url() ); exit; }