From 0d6a380bd2dee39b414608b32df885c3e308734f Mon Sep 17 00:00:00 2001 From: wpmuguru Date: Wed, 20 Jan 2010 20:42:20 +0000 Subject: [PATCH] make server address in network settings a label, See #11644 git-svn-id: http://svn.automattic.com/wordpress/trunk@12777 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/options-network.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/wp-admin/options-network.php b/wp-admin/options-network.php index d7beab393f..e5ed9bb75e 100644 --- a/wp-admin/options-network.php +++ b/wp-admin/options-network.php @@ -151,9 +151,9 @@ function printstep1form( $rewrite_enabled = false ) { Server Address -

What is the Internet address of your site? You should enter the shortest address possible. For example, use example.com instead of www.example.com but if you are going to use an address like blogs.example.com then enter that unaltered in the box below.

- -

Do not use an IP address (like 127.0.0.1) or a single word hostname like localhost as your server address, use localhost.localdomain instead.

+

This will be the Internet address of your site: .

+ +

Do not use an IP address (like 127.0.0.1) or a single word hostname like localhost as your server address.

@@ -262,8 +262,8 @@ function step2_config() { function get_clean_basedomain() { global $wpdb; - $domain = $wpdb->escape( $_POST[ 'basedomain' ] ); - $domain = str_replace( 'http://', '', $domain ); + $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, '/' ) ) @@ -308,14 +308,11 @@ switch($action) { require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); // create network tables - $_SERVER[ 'HTTP_HOST' ] = str_replace( 'www.', '', $_SERVER[ 'HTTP_HOST' ] ); // normalise hostname - no www. + $domain = get_clean_basedomain(); install_network(); - populate_network( 1, $_SERVER[ 'HTTP_HOST' ], sanitize_email( $_POST[ 'email' ] ), $_POST[ 'weblog_title' ], $base, $_POST[ 'vhost' ] ); + populate_network( 1, $domain, sanitize_email( $_POST[ 'email' ] ), $_POST[ 'weblog_title' ], $base, $_POST[ 'vhost' ] ); // create wp-config.php / htaccess step2(); -//continue; - -// step3(); break; default: //@todo: give an informative screen instead