Ticket #12457: 12457.diff
File 12457.diff, 2.8 KB (added by , 15 years ago) |
---|
-
wp-admin/network.php
153 153 $email = get_option( 'admin_email' ); 154 154 $hostname = get_clean_basedomain(); 155 155 $invalid_host = false; 156 if ( 'localhost' == $hostname ||preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname, $match ) )156 if ( preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname, $match ) ) 157 157 $invalid_host = true; 158 $localhost = ( 'localhost' == $hostname ); 158 159 if ( substr( $hostname, 0, 4 ) == 'www.' ) 159 160 $nowww = substr( $hostname, 4 ); 160 161 $base = stripslashes( dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ) ); 162 if ( $base == '/' ) 163 $base = ''; 164 161 165 wp_nonce_field( 'install-network-1' ); 162 166 if ( network_domain_check() ) { ?> 163 167 <h2><?php esc_html_e( 'Existing Sites' ); ?></h2> … … 176 180 <p><?php _e( '<strong>Note</strong> It looks like <code>mod_rewrite</code> is not installed.' ); ?></p> 177 181 <?php } ?> 178 182 <p class="blog-address"> 179 <label><input type='radio' name='vhost' value='yes'<?php if ( $rewrite_enabled ) echo ' checked="checked"'; ?> /> <?php _e( 'Sub-domains (like <code>blog1.example.com</code>)'); ?></label><br />180 <label><input type='radio' name='vhost' value='no'<?php if ( ! $rewrite_enabled ) echo ' checked="checked"'; ?> /> <?php _e( 'Sub-directories (like <code>example.com/blog1</code>)'); ?></label>183 <label><input type='radio' name='vhost' value='yes'<?php checked($rewrite_enabled && !$localhost && !$base, true); if ( $localhost ) echo ' disabled="disabled"'; ?> /> <?php echo sprintf(__( 'Sub-domains (like <code>blog1.%s</code>)' ), $hostname); ?></label><br /> 184 <label><input type='radio' name='vhost' value='no'<?php checked($rewrite_enabled && !$localhost && !$base, false); ?> /> <?php echo sprintf(__( 'Sub-directories (like <code>%s/blog1</code>)' ), $hostname . $base); ?></label> 181 185 </p> 182 186 183 187 <h2><?php esc_html_e( 'Server Address' ); ?></h2> … … 188 192 <tr> 189 193 <th scope='row'><?php esc_html_e( 'Server Address' ); ?></th> 190 194 <td> 191 <?php if ( !$invalid_host ) { ?> 192 <?php printf( __( 'This will be the Internet address of your site: <strong><em>%s</em></strong>.' ), $hostname ); ?> 195 <?php if ( !$invalid_host ) { ?><code><?php echo home_url(); ?></code> 196 <br /> 197 <?php _e( 'This will be the base Internet address of your site.' ); ?> 193 198 <input type='hidden' name='basedomain' value='<?php echo esc_attr( $hostname ); ?>' /> 194 199 <?php } else { ?> 195 <?php _e( 'Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q>as your server address.' ); ?>200 <?php _e( 'Do not use an IP address (like 127.0.0.1) as your server address.' ); ?> 196 201 <?php } ?> 197 202 </td> 198 203 </tr>