diff --git a/wp-admin/options-network.php b/wp-admin/options-network.php index 00a7c5d1ee..fa9033d8ee 100644 --- a/wp-admin/options-network.php +++ b/wp-admin/options-network.php @@ -129,9 +129,9 @@ function step1() { function printstep1form( $rewrite_enabled = false ) { $weblog_title = ucfirst( get_option( 'blogname' ) ) . ' Sites'; $email = get_option( 'admin_email' ); - $hostname = $_SERVER[ 'HTTP_HOST' ]; - if( substr( $_SERVER[ 'HTTP_HOST' ], 0, 4 ) == 'www.' ) - $hostname = str_replace( "www.", "", $_SERVER[ 'HTTP_HOST' ] ); + $hostname = get_clean_basedomain(); + if( substr( $hostname, 0, 4 ) == 'www.' ) + $nowww = substr( $hostname, 4 ); wp_nonce_field( 'install-network-1' ); ?> @@ -147,6 +147,9 @@ function printstep1form( $rewrite_enabled = false ) {
before enabling the network feature. It will still be possible to visit your site using the "www" prefix with an address like
but any links will not have the "www" prefix. Server Address | @@ -263,43 +266,15 @@ function step2_config() { function get_clean_basedomain() { global $wpdb; $domain = preg_replace( '|https?://|', '', get_option( 'siteurl') ); - //@todo: address no www in multisite code - if( substr( $domain, 0, 4 ) == 'www.' ) - $domain = substr( $domain, 4 ); if( strpos( $domain, '/' ) ) $domain = substr( $domain, 0, strpos( $domain, '/' ) ); return $domain; } -function nowww() { - $nowww = str_replace( 'www.', '', $_POST[ 'basedomain' ] ); - ?> -
---|