Changeset 12777
- Timestamp:
- 01/20/2010 08:42:20 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/options-network.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-network.php
r12757 r12777 152 152 <th scope='row'>Server Address</th> 153 153 <td> 154 <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>155 <input type=' text' name='basedomain' value='<?php echo $hostname ?>' />156 <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>154 <p>This will be the Internet address of your site: <strong><em><?php echo $hostname; ?></em></strong>.</p> 155 <input type='hidden' name='basedomain' value='<?php echo $hostname ?>' /> 156 <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> 157 157 </td> 158 158 </tr> … … 263 263 function get_clean_basedomain() { 264 264 global $wpdb; 265 $domain = $wpdb->escape( $_POST[ 'basedomain' ]);266 $domain = str_replace( 'http://', '', $domain );265 $domain = preg_replace( '|https?://|', '', get_option( 'siteurl') ); 266 //@todo: address no www in multisite code 267 267 if( substr( $domain, 0, 4 ) == 'www.' ) 268 268 $domain = substr( $domain, 4 ); … … 309 309 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 310 310 // create network tables 311 $ _SERVER[ 'HTTP_HOST' ] = str_replace( 'www.', '', $_SERVER[ 'HTTP_HOST' ] ); // normalise hostname - no www.311 $domain = get_clean_basedomain(); 312 312 install_network(); 313 populate_network( 1, $ _SERVER[ 'HTTP_HOST' ], sanitize_email( $_POST[ 'email' ] ), $_POST[ 'weblog_title' ], $base, $_POST[ 'vhost' ] );313 populate_network( 1, $domain, sanitize_email( $_POST[ 'email' ] ), $_POST[ 'weblog_title' ], $base, $_POST[ 'vhost' ] ); 314 314 // create wp-config.php / htaccess 315 315 step2(); 316 //continue;317 318 // step3();319 316 break; 320 317 default:
Note: See TracChangeset
for help on using the changeset viewer.