Changeset 13622 for trunk/wp-admin/network.php
- Timestamp:
- 03/09/2010 06:14:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network.php
r13614 r13622 57 57 58 58 $hostname = get_clean_basedomain(); 59 if ( 'localhost' == $hostname ||preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) {59 if ( preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) { 60 60 echo '<p><strong>' . __('You cannot install a network of sites with your server address.' ) . '</strong></p>'; 61 echo '<p>' . __('You cannot use an IP address such as <code>127.0.0.1</code> or a single-word hostname like <code>localhost</code>.' ) . '</p>'; 62 if ( 'localhost' == $hostname ) 63 echo '<p>' . __('Consider using <code>localhost.localdomain</code>.') . '</p>'; 61 echo '<p>' . __('You cannot use an IP address such as <code>127.0.0.1</code>.' ) . '</p>'; 64 62 include( './admin-footer.php' ); 65 63 die(); … … 94 92 <?php } ?> 95 93 <input type='hidden' name='action' value='step2' /> 94 <?php if ( 'localhost' != $hostname ) : ?> 96 95 <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3> 97 98 96 <p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>' ); ?></p> 99 97 <p><?php _e( "You will need a wildcard DNS record if you're going to use the virtual host (sub-domain) functionality." ); ?></p> … … 114 112 115 113 <?php 114 endif; 115 116 116 $is_www = ( substr( $hostname, 0, 4 ) == 'www.' ); 117 117 if ( $is_www ) : … … 132 132 <h3><?php esc_html_e( 'Network Details' ); ?></h3> 133 133 <table class="form-table"> 134 <?php if ( 'localhost' == $hostname ) : ?> 135 <tr> 136 <th scope="row"><?php esc_html_e( 'Sub-directory Install' ); ?></th> 137 <td><?php _e('Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.'); ?></td> 138 </tr> 139 <?php endif; ?> 134 140 <?php if ( ! $is_www ) : ?> 135 141 <tr> … … 175 181 <textarea class="code" readonly="readonly" cols="100" rows="7"> 176 182 define( 'MULTISITE', true ); 177 define( 'VHOST', '<?php echo 'yes' == stripslashes( $_POST['vhost']) ? 'yes' : 'no'; ?>' );183 define( 'VHOST', '<?php echo ( ! empty( $_POST['vhost'] ) && 'yes' == stripslashes( $_POST['vhost'] ) ) ? 'yes' : 'no'; ?>' ); 178 184 $base = '<?php echo $base; ?>'; 179 185 define( 'DOMAIN_CURRENT_SITE', '<?php echo get_clean_basedomain(); ?>' ); … … 258 264 // create network tables 259 265 install_network(); 266 $hostname = get_clean_basedomain(); 267 $vhost = 'localhost' == $hostname ? false : (bool) $_POST['vhost']; 260 268 if ( !network_domain_check() || isset( $_POST['existing_network'] ) && $_POST['existing_network'] == '0' ) 261 populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), $_POST['weblog_title'], $base, $ _POST['vhost']);269 populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), $_POST['weblog_title'], $base, $vhost ); 262 270 // create wp-config.php / htaccess 263 271 network_step2();
Note: See TracChangeset
for help on using the changeset viewer.