X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/a5227bf01edbe6660486c9f5c0f0ed7b7fea3130..f9001779751f83dc8a10e478bfecb4d8dd5f964c:/wp-admin/network.php
diff --git a/wp-admin/network.php b/wp-admin/network.php
index a2951641..6a9aca33 100644
--- a/wp-admin/network.php
+++ b/wp-admin/network.php
@@ -18,8 +18,14 @@ 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.' ) );
+if ( is_multisite() ) {
+ if ( ! is_network_admin() ) {
+ wp_redirect( network_admin_url( 'setup.php' ) );
+ exit;
+ }
+ if ( ! 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 )
@@ -89,8 +95,13 @@ function get_clean_basedomain() {
if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) )
wp_die( __( 'You must define the WP_ALLOW_MULTISITE
constant as true in your wp-config.php file to allow creation of a Network.' ) );
-$title = __( 'Create a Network of WordPress Sites' );
-$parent_file = 'tools.php';
+if ( is_network_admin() ) {
+ $title = __( 'Network Setup' );
+ $parent_file = 'settings.php';
+} else {
+ $title = __( 'Create a Network of WordPress Sites' );
+ $parent_file = 'tools.php';
+}
add_contextual_help($current_screen,
'
' . __('This screen allows you to configure a network as having subdomains (site1.example.com
) or subdirectories (example.com/site1
). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '
' . __('Refreshing your browser will take you to a screen with an archive of those added lines of code. A set of six links under Super Admin will appear at the top of the main left navigation menu. The multisite network is now enabled.') . '
' . '' . __('The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed soon in a future version.') . '
' . '' . __('For more information:') . '
' . - '' . __('General Network Creation Documentation') . '
' . - '' . __('Tools > Network Documentation') . '
' . + '' . __('Documentation on Creating a Network') . '
' . + '' . __('Documentation on the Network Screen') . '
' . '' . __('Support Forums') . '
' ); -include( './admin-header.php' ); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>' . __('Error:') . ' ' . sprintf( __( 'Your WordPress address must match your Site address before creating a Network. See General Settings.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '
' . __('Error:') . ' ' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.' ) . '
' . __('Warning:') . ' ' . sprintf( __( 'Please deactivate your plugins before enabling the Network feature.' ), admin_url( 'plugins.php?plugin_status=active' ) ) . '
' . __( 'Once the network is created, you may reactivate your plugins.' ) . '
'; echo ''; - include( './admin-footer.php' ); + include( ABSPATH . 'wp-admin/admin-footer.php' ); die(); } @@ -145,7 +163,7 @@ function network_step1( $errors = false ) { echo '' . sprintf( __( 'You cannot use port numbers such as %s
.' ), $has_ports ) . '
' />
+ - ' . $errors->get_error_message() . ''; if ( $_POST ) { - $subdomain_install = allow_subdomain_install() ? ( allow_subdirectory_install() ? ! empty( $_POST['subdomain_install'] ) : true ) : false; + if ( allow_subdomain_install() ) + $subdomain_install = allow_subdirectory_install() ? ! empty( $_POST['subdomain_install'] ) : true; + else + $subdomain_install = false; } else { if ( is_multisite() ) { $subdomain_install = is_subdomain_install(); ?> -
Caution: We recommend you back up your existing wp-config.php
file.' );
+ if ( file_exists( ABSPATH . '.htaccess' ) )
+ printf( __( 'Caution: We recommend you back up your existing wp-config.php
and %s
files.' ), '.htaccess' );
+ elseif ( file_exists( ABSPATH . 'web.config' ) )
+ printf( __( 'Caution: We recommend you back up your existing wp-config.php
and %s
files.' ), 'web.config' );
else
- _e( 'Caution: We recommend you back up your existing wp-config.php
and .htaccess
files.' );
+ _e( 'Caution: We recommend you back up your existing wp-config.php
file.' );
?>
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 );
+ printf( __( 'Create a blogs.dir
directory at %s/blogs.dir
. This directory is used to store uploaded media for your additional sites and must be writeable by the web server.' ), WP_CONTENT_DIR );
if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' )
echo ' ' . __('Warning:') . ' ' . __( 'Networks may not be fully compatible with custom wp-content directories.' ) . '
wp-config.php file.', 'These unique authentication keys are also missing from your wp-config.php
file.', $num_keys_salts ); ?>
web.config file in %s
, replacing other WordPress rules:' ), ABSPATH ); ?>
.htaccess file in %s
, replacing other WordPress rules:' ), ABSPATH ); ?>