Make WordPress Core


Ignore:
Timestamp:
03/10/2010 08:17:07 AM (16 years ago)
Author:
nacin
Message:

Correct subdomain handling in network.php. Pass around boolean values instead of 'yes' and 'no'. see #11816

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r13636 r13641  
    621621 * @param int $network_id id of network to populate
    622622 */
    623 function populate_network( $network_id = 1, $domain = '', $email = '', $site_name = '', $path = '/', $vhost = 'no' ) {
     623function populate_network( $network_id = 1, $domain = '', $email = '', $site_name = '', $path = '/', $subdomain_install = false ) {
    624624    global $wpdb, $current_site, $wp_db_version, $wp_rewrite;
    625625
     
    733733    }
    734734
    735     if ( $vhost == 'yes' )
     735    if ( $subdomain_install )
    736736        update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/');
    737737    else
     
    740740    $wp_rewrite->flush_rules();
    741741
    742     if ( $vhost == 'yes' ) {
     742    if ( $subdomain_install ) {
    743743        $vhost_ok = false;
    744744        $hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
    745745        $page = wp_remote_get( 'http://' . $hostname, array( 'timeout' => 5, 'httpversion' => '1.1' ) );
    746         if ( is_object( $page ) && is_wp_error( $page ) ) {
     746        if ( is_wp_error( $page ) ) {
    747747            foreach ( $page->get_error_messages() as $err ) {
    748748                $errstr = $err;
     
    751751                $vhost_ok = true;
    752752        }
    753         if ( !$vhost_ok ) {
     753        if ( ! $vhost_ok ) {
    754754            // @todo Update this to reflect the merge. Also: Multisite readme file, or remove the <blockquote> tags.
    755755            $msg = '<h2>' . esc_html__( 'Warning! Wildcard DNS may not be configured correctly!' ) . '</h2>';
Note: See TracChangeset for help on using the changeset viewer.