Don't allow access to network.php if running an MU network. It is only for networks created in 3.0. see #11816. Also, fix MS htaccess logic, see #12136

git-svn-id: http://svn.automattic.com/wordpress/trunk@13679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-03-11 23:53:03 +00:00
parent 92166b22f6
commit 1cb0f9042b
2 changed files with 5 additions and 2 deletions

View File

@ -182,7 +182,7 @@ $menu[75] = array( __('Tools'), 'read', 'tools.php', '', 'menu-top menu-icon-too
$submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' );
if ( is_multisite() && !is_main_site() )
$submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' );
if ( is_super_admin() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
if ( ( ! is_multisite() || defined( 'MULTISITE' ) ) && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() )
$submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php');
$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' );

View File

@ -16,6 +16,9 @@ require_once( './admin.php' );
if ( ! is_super_admin() )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
if ( is_multisite() && ! defined( 'MULTISITE' ) )
wp_die( __('The Network creation panel is not for WordPress MU networks.') );
// We need to create references to ms global tables to enable Network.
foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table )
$wpdb->$table = $prefixed_table;
@ -286,7 +289,7 @@ RewriteBase ' . $base . '
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^' . ( $vhost ? '([_0-9a-zA-Z-]+/)?' : '' ) . 'files/(.+) wp-includes/ms-files.php?file=$2 [L]' . "\n";
RewriteRule ^' . ( $vhost ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $vhost ? 1 : 2 ) . ' [L]' . "\n";
if ( ! $vhost )
$htaccess_file .= "\n# add a trailing slash to /wp-admin\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]' . "\n";