Changeset 13622
- Timestamp:
- 03/09/2010 06:14:42 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 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(); -
trunk/wp-includes/ms-default-constants.php
r13268 r13622 62 62 * @since 2.0.0 63 63 */ 64 if ( !defined('COOKIE_DOMAIN') ) {64 if ( !defined('COOKIE_DOMAIN') && 'localhost' != $current_site->cookie_domain ) { 65 65 if ( isset( $current_site->cookie_domain ) ) 66 66 define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); -
trunk/wp-includes/ms-load.php
r13611 r13622 183 183 * Used when blog does not exist. Checks for a missing $wpdb->site table as well. 184 184 * 185 * @todo update for 3.0, pare down, and i18n 186 * 185 187 * @access private 186 188 * @since 3.0.0 … … 189 191 global $wpdb, $domain, $path; 190 192 191 $msg = '<h1>' . esc_html( 'Fatal Error' ). '</h1>';192 $msg 193 $msg = '<h1>' . 'Fatal Error' . '</h1>'; 194 $msg .= '<p>' . 'If your site does not display, please contact the owner of this network.' . '</p>'; 193 195 $msg .= '<p>' . 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' . '</p>'; 194 196 if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) … … 196 198 else 197 199 $msg .= '<p>' . sprintf( '<strong>Could Not Find Site!</strong> Searched for table <em>%1$s</em> in <code>%2$s</code>. Is that right?', $domain . $path, DB_NAME, $wpdb->blogs ) . '</p>'; 198 $msg .= '<h1>' . esc_html( 'What do I do now?' ). '</h1>';200 $msg .= '<h1>' . 'What do I do now?' . '</h1>'; 199 201 // @todo Update WPMU codex link. 200 202 $msg .= '<p>' . 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' . '</p>'; … … 205 207 $msg .= '</ul>'; 206 208 // @todo Update WPMU codex link and support instructions. 207 $msg = '<p>' . 'If you suspect a problem please report it to the support forums but you must include the information asked for in the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">WPMU bug reporting guidelines</a>! ' . '</p>'; 208 209 // @todo This file no longer exists post-merge. 210 if ( is_file( 'release-info.txt' ) ) { 211 $msg .= '<p>' . 'Your bug report must include the following text:' . '</p>'; 212 $info = file( 'release-info.txt' ); 213 $msg .= $info[ 4 ] . '"'; 214 } 209 $msg .= '<p>' . 'If you suspect a problem please report it to the support forums but you must include the information asked for in the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">WPMU bug reporting guidelines</a>! ' . '</p>'; 215 210 216 211 die( $msg ); -
trunk/wp-includes/ms-settings.php
r13610 r13622 12 12 // $base sanity check. 13 13 if ( 'BASE' == $base ) 14 die( 'Configuration error in <code>wp-config.php< code>. <code>$base</code> is set to "BASE" when it should be the path like "/" or "/blogs/".' );14 die( 'Configuration error in <code>wp-config.php</code>. <code>$base</code> is set to "BASE" when it should be the path like "/" or "/blogs/".' ); 15 15 16 16 /** Include Multisite initialization functions */
Note: See TracChangeset
for help on using the changeset viewer.