X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-admin/network.php diff --git a/wp-admin/network.php b/wp-admin/network.php index e5046f9b..ae351510 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -35,6 +35,9 @@ foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) * Check for an existing network. * * @since 3.0.0 + * + * @global wpdb $wpdb + * * @return Whether a network exists. */ function network_domain_check() { @@ -55,7 +58,7 @@ function network_domain_check() { */ function allow_subdomain_install() { $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) ); - if( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) + if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) return false; return true; @@ -64,6 +67,9 @@ function allow_subdomain_install() { * Allow subdirectory install. * * @since 3.0.0 + * + * @global wpdb $wpdb + * * @return bool Whether subdirectory install is allowed */ function allow_subdirectory_install() { @@ -120,8 +126,8 @@ $network_help = '

' . __('This screen allows you to configure a network as hav '

' . __('Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.') . '

' . '

' . __('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 in a future version.') . '

' . '

' . __('For more information:') . '

' . - '

' . __('Documentation on Creating a Network') . '

' . - '

' . __('Documentation on the Network Screen') . '

'; + '

' . __('Documentation on Creating a Network') . '

' . + '

' . __('Documentation on the Network Screen') . '

'; get_current_screen()->add_help_tab( array( 'id' => 'network', @@ -131,15 +137,15 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Creating a Network') . '

' . - '

' . __('Documentation on the Network Screen') . '

' . + '

' . __('Documentation on Creating a Network') . '

' . + '

' . __('Documentation on the Network Screen') . '

' . '

' . __('Support Forums') . '

' ); include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

'; + echo '
'; wp_nonce_field( 'install-network-1' ); @@ -223,11 +233,19 @@ function network_step1( $errors = false ) { - + - +
site1.%1$s and site2.%1$s', 'subdomain examples' ), $hostname ); ?>site1.%1$s and site2.%1$s', 'subdomain examples' ), + $hostname + ); ?>
%1$s/site1 and %1$s/site2', 'subdirectory examples' ), $hostname ); ?>%1$s/site1 and %1$s/site2', 'subdirectory examples' ), + $hostname + ); ?>
@@ -318,6 +336,10 @@ function network_step1( $errors = false ) { * Prints step 2 for Network installation process. * * @since 3.0.0 + * + * @global wpdb $wpdb + * + * @param WP_Error $errors */ function network_step2( $errors = false ) { global $wpdb; @@ -383,13 +405,14 @@ function network_step2( $errors = false ) { ?>
  1. wp-config.php file in %s above the line reading /* That’s all, stop editing! Happy blogging. */:' ), $location_of_wp_config ); ?>

    - +define('BLOG_ID_CURRENT_SITE', 1); + '', 'SECURE_AUTH_KEY' => '', 'LOGGED_IN_KEY' => '', 'NONCE_KEY' => '', 'AUTH_SALT' => '', 'SECURE_AUTH_SALT' => '', 'LOGGED_IN_SALT' => '', 'NONCE_SALT' => '' ); foreach ( $keys_salts as $c => $v ) { @@ -412,8 +435,16 @@ define('BLOG_ID_CURRENT_SITE', 1); } $num_keys_salts = count( $keys_salts ); ?> -

    wp-config.php file.', 'These unique authentication keys are also missing from your wp-config.php file.', $num_keys_salts ); ?>

    +

    + wp-config.php file.' ); + } else { + _e( 'These unique authentication keys are also missing from your wp-config.php file.' ); + } + ?> + +

    -'; + +'; echo '
  2. '; /* translators: 1: a filename like .htaccess. 2: a file path. */ @@ -506,6 +538,7 @@ RewriteRule ^ - [L] RewriteRule ^{$subdir_match}(wp-(content|admin|includes).*) {$rewrite_base}{$subdir_replacement_12} [L] RewriteRule ^{$subdir_match}(.*\.php)$ {$rewrite_base}$subdir_replacement_12 [L] RewriteRule . index.php [L] + EOF; echo '

  3. '; @@ -523,7 +556,7 @@ EOF; -

    +