always call set_blog_id after blog lookup, See #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@13421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c7aa32c0ac
commit
4dc6a43f96
|
@ -16,8 +16,7 @@ require( ABSPATH . WPINC . '/ms-default-constants.php' );
|
||||||
if ( defined( 'SUNRISE' ) )
|
if ( defined( 'SUNRISE' ) )
|
||||||
include_once( WP_CONTENT_DIR . '/sunrise.php' );
|
include_once( WP_CONTENT_DIR . '/sunrise.php' );
|
||||||
|
|
||||||
if ( isset( $current_site ) && isset( $current_blog ) )
|
if ( !isset( $current_site ) || !isset( $current_blog ) ) {
|
||||||
return;
|
|
||||||
|
|
||||||
$domain = addslashes( $_SERVER['HTTP_HOST'] );
|
$domain = addslashes( $_SERVER['HTTP_HOST'] );
|
||||||
if ( false !== strpos( $domain, ':' ) ) {
|
if ( false !== strpos( $domain, ':' ) ) {
|
||||||
|
@ -114,8 +113,8 @@ if ( ! $blog_id ) {
|
||||||
wp_die( __( 'No blog by that name on this system.' ) . $msg );
|
wp_die( __( 'No blog by that name on this system.' ) . $msg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$wpdb->set_prefix( $table_prefix, false ); // set DB table prefix
|
$wpdb->set_prefix( $table_prefix, false ); // $table_prefix can be set in sunrise.php
|
||||||
$wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id );
|
$wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id );
|
||||||
$table_prefix = $wpdb->get_blog_prefix();
|
$table_prefix = $wpdb->get_blog_prefix();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue