WordPress.org

Make WordPress Core

Changeset 12759


Ignore:
Timestamp:
01/19/2010 04:14:06 PM (8 years ago)
Author:
ryan
Message:

Formatting cleanups

File:
1 edited

Legend:

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

    r12756 r12759  
    320320    // 3.0 multisite
    321321    if ( is_multisite() ) {
    322          $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), $current_site->site_name );
    323          $options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
     322        $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), $current_site->site_name );
     323        $options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
    324324    }
    325325
     
    624624
    625625    //@todo: turn these checks into returned messages
    626     if( $domain == '' )
     626    if ( $domain == '' )
    627627        die( 'You must provide a domain name!' );
    628     if( $site_name == '' )
     628    if ( $site_name == '' )
    629629        die( 'You must provide a site name!' );
    630630
    631631    // check for network collision
    632632    $existing_network = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->site} WHERE id = %d", $network_id ) );
    633     if( $existing_network == $network_id )
     633    if ( $existing_network == $network_id )
    634634        die( 'That network already exists!' );
    635635
    636636    $site_user = get_user_by_email( $email );
    637     if( !$site_user )
     637    if ( !$site_user )
    638638        die( 'You must provide an email address!' );
    639639    // set up site tables
    640640    $template = get_option( 'template' );
    641641    $stylesheet = get_option( 'stylesheet' );
    642     if ( $template != $stylesheet ) {
     642    if ( $template != $stylesheet )
    643643        $allowed_themes = array( $template, $stylesheet );
    644     } else {
     644    else
    645645        $allowed_themes = array( $stylesheet );
    646     }
     646
    647647    $wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'site_name', %s)", $network_id, $site_name ) );
    648648    $wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'admin_email', %s)", $network_id, $site_user->user_email ) );
     
    662662        if ( $users ) {
    663663            foreach ( $users as $user ) {
    664                 if ( is_super_admin( $user->ID ) && !in_array( $user->user_login, $site_admins ) ) {
     664                if ( is_super_admin( $user->ID ) && !in_array( $user->user_login, $site_admins ) )
    665665                    $site_admins[] = $user->user_login;
    666                 }
    667666            }
    668667        }
     
    701700    }
    702701
    703     if( $vhost == 'yes' ) {
     702    if ( $vhost == 'yes' )
    704703        update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/');
    705     } else {
     704    else
    706705        update_option( 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/');
    707     }
     706
    708707    $wp_rewrite->flush_rules();
    709708
     
    712711        $hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
    713712        $page = wp_remote_get( 'http://' . $hostname, array( 'timeout' => 5, 'httpversion' => '1.1' ) );
    714         if( is_object( $page ) && is_wp_error( $page ) ) {
    715             foreach ( $page->get_error_messages() as $err )
     713        if ( is_object( $page ) && is_wp_error( $page ) ) {
     714            foreach ( $page->get_error_messages() as $err ) {
    716715                $errstr = $err;
     716            }
    717717        } elseif( $page[ 'response' ][ 'code' ] == 200 ) {
    718718                $vhost_ok = true;
    719719        }
    720         if( !$vhost_ok ) {
     720        if ( !$vhost_ok ) {
    721721            $msg = "<h2>Warning! Wildcard DNS may not be configured correctly!</h2>";
    722722            $msg .= "<p>To use the subdomain feature of WordPress MU you must have a wildcard entry in your dns. The installer attempted to contact a random hostname ($hostname) on your domain but failed. It returned this error message:<br /> <strong>$errstr</strong></p><p>From the README.txt:</p>";
     
    728728    return $msg;
    729729}
     730
    730731?>
Note: See TracChangeset for help on using the changeset viewer.