Formatting cleanups

git-svn-id: https://develop.svn.wordpress.org/trunk@12759 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-01-19 16:14:06 +00:00
parent cd9ec93ec6
commit 179e1c6d15
1 changed files with 18 additions and 17 deletions

View File

@ -639,11 +639,11 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam
// set up site tables
$template = get_option( 'template' );
$stylesheet = get_option( 'stylesheet' );
if ( $template != $stylesheet ) {
if ( $template != $stylesheet )
$allowed_themes = array( $template, $stylesheet );
} else {
else
$allowed_themes = array( $stylesheet );
}
$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 ) );
$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 ) );
$wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'admin_user_id', %d)", $network_id, $site_user->ID ) );
@ -661,11 +661,10 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam
$users = get_users_of_blog();
if ( $users ) {
foreach ( $users as $user ) {
if ( is_super_admin( $user->ID ) && !in_array( $user->user_login, $site_admins ) ) {
if ( is_super_admin( $user->ID ) && !in_array( $user->user_login, $site_admins ) )
$site_admins[] = $user->user_login;
}
}
}
} else {
$site_admins = get_site_option( 'site_admins' );
}
@ -700,11 +699,11 @@ Thanks!
update_usermeta( $site_user->ID, 'primary_blog', 1 );
}
if( $vhost == 'yes' ) {
if ( $vhost == 'yes' )
update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/');
} else {
else
update_option( 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/');
}
$wp_rewrite->flush_rules();
if ( $vhost == 'yes' ) {
@ -712,8 +711,9 @@ Thanks!
$hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
$page = wp_remote_get( 'http://' . $hostname, array( 'timeout' => 5, 'httpversion' => '1.1' ) );
if ( is_object( $page ) && is_wp_error( $page ) ) {
foreach ( $page->get_error_messages() as $err )
foreach ( $page->get_error_messages() as $err ) {
$errstr = $err;
}
} elseif( $page[ 'response' ][ 'code' ] == 200 ) {
$vhost_ok = true;
}
@ -727,4 +727,5 @@ This usually means adding a '*' hostname record pointing at your webserver in yo
}
return $msg;
}
?>