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
This commit is contained in:
parent
af9c401d97
commit
0d6a380bd2
|
@ -151,9 +151,9 @@ function printstep1form( $rewrite_enabled = false ) {
|
||||||
<tr>
|
<tr>
|
||||||
<th scope='row'>Server Address</th>
|
<th scope='row'>Server Address</th>
|
||||||
<td>
|
<td>
|
||||||
<p>What is the Internet address of your site? You should enter the shortest address possible. For example, use <em>example.com</em> instead of <em>www.example.com</em> but if you are going to use an address like <em>blogs.example.com</em> then enter that unaltered in the box below.</p>
|
<p>This will be the Internet address of your site: <strong><em><?php echo $hostname; ?></em></strong>.</p>
|
||||||
<input type='text' name='basedomain' value='<?php echo $hostname ?>' />
|
<input type='hidden' name='basedomain' value='<?php echo $hostname ?>' />
|
||||||
<p>Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q> as your server address, use <q>localhost.localdomain</q> instead.</p>
|
<p>Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q> as your server address.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -262,8 +262,8 @@ function step2_config() {
|
||||||
|
|
||||||
function get_clean_basedomain() {
|
function get_clean_basedomain() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$domain = $wpdb->escape( $_POST[ 'basedomain' ] );
|
$domain = preg_replace( '|https?://|', '', get_option( 'siteurl') );
|
||||||
$domain = str_replace( 'http://', '', $domain );
|
//@todo: address no www in multisite code
|
||||||
if( substr( $domain, 0, 4 ) == 'www.' )
|
if( substr( $domain, 0, 4 ) == 'www.' )
|
||||||
$domain = substr( $domain, 4 );
|
$domain = substr( $domain, 4 );
|
||||||
if( strpos( $domain, '/' ) )
|
if( strpos( $domain, '/' ) )
|
||||||
|
@ -308,14 +308,11 @@ switch($action) {
|
||||||
|
|
||||||
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
||||||
// create network tables
|
// create network tables
|
||||||
$_SERVER[ 'HTTP_HOST' ] = str_replace( 'www.', '', $_SERVER[ 'HTTP_HOST' ] ); // normalise hostname - no www.
|
$domain = get_clean_basedomain();
|
||||||
install_network();
|
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
|
// create wp-config.php / htaccess
|
||||||
step2();
|
step2();
|
||||||
//continue;
|
|
||||||
|
|
||||||
// step3();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//@todo: give an informative screen instead
|
//@todo: give an informative screen instead
|
||||||
|
|
Loading…
Reference in New Issue