From 93f0c5ee6afdbec5e2fc7be65a9fce86cdba3f8c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 9 Mar 2010 22:42:36 +0000 Subject: [PATCH] Expose a read-only network.php once multisite is enabled, to ensure access to original configuration such as rewrite rules. see #11816 git-svn-id: https://develop.svn.wordpress.org/trunk@13638 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/menu.php | 2 +- wp-admin/network.php | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index fdeef39d67..7e947db253 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -181,7 +181,7 @@ $menu[75] = array( __('Tools'), 'read', 'tools.php', '', 'menu-top', 'menu-tools $submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' ); if ( is_multisite() && ($current_blog->domain . $current_blog->path != $current_site->domain . $current_site->path) ) $submenu['tools.php'][25] = array( __('Delete Blog'), 'manage_options', 'ms-delete-site.php' ); - if ( !is_multisite() && is_super_admin() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE ) + if ( is_super_admin() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE ) $submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php'); $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top', 'menu-settings', 'div' ); diff --git a/wp-admin/network.php b/wp-admin/network.php index 3413cba05e..76e6b4e104 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -16,9 +16,6 @@ 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() ) - wp_die( __( 'The Network feature is already enabled.' ) ); - include( ABSPATH . 'wp-admin/includes/network.php' ); // We need to create references to ms global tables to enable Network. @@ -171,13 +168,19 @@ function network_step1() { */ function network_step2() { global $base, $wpdb; - if ( ! $_POST ) : ?> + if ( ! $_POST ) : + if ( is_multisite() ) : ?> +

+

-

Caution: We recommend you backup your existing wp-config.php and .htaccess files.' ); ?>

+
  1. blogs.dir directory in %s. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.' ), WP_CONTENT_DIR ); ?>

  2. wp-config.php file in %s:' ), ABSPATH ); ?>

    @@ -250,8 +253,10 @@ RewriteRule . index.php [L]';
+