X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..bf5c68485ef07868ad0a91168ecd0092af7661ae:/wp-includes/ms-load.php diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index 353cbe2f..5ff0526f 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -119,8 +119,8 @@ function get_current_site_name( $current_site ) { $current_site->site_name = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = %d AND meta_key = 'site_name'", $current_site->id ) ); if ( ! $current_site->site_name ) $current_site->site_name = ucfirst( $current_site->domain ); + wp_cache_set( $current_site->id . ':site_name', $current_site->site_name, 'site-options' ); } - wp_cache_set( $current_site->id . ':site_name', $current_site->site_name, 'site-options' ); return $current_site; } @@ -134,6 +134,10 @@ function get_current_site_name( $current_site ) { */ function wpmu_current_site() { global $wpdb, $current_site, $domain, $path, $sites, $cookie_domain; + + if ( empty( $current_site ) ) + $current_site = new stdClass; + if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) { $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1; $current_site->domain = DOMAIN_CURRENT_SITE; @@ -234,7 +238,7 @@ function ms_not_installed() { $msg .= '

' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'Database tables are missing. This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '

'; else $msg .= '

' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'Could not find site %1$s. Searched for table %2$s in database %3$s. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '

'; - $msg .= '

' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*WP_I18N_WHAT_DO_I_DO*/ . ' '; + $msg .= '

' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*/WP_I18N_WHAT_DO_I_DO*/ . ' '; $msg .= /*WP_I18N_RTFM*/'Read the bug report page. Some of the guidelines there may help you figure out what went wrong.'/*/WP_I18N_RTFM*/; $msg .= ' ' . /*WP_I18N_STUCK*/'If you’re still stuck with this message, then check that your database contains the following tables:'/*/WP_I18N_STUCK*/ . '