Changeset 36393
- Timestamp:
- 01/25/2016 09:51:01 PM (9 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r36258 r36393 211 211 212 212 if ( empty($details) ) { 213 $details = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE blog_id = %d /* get_blog_details */", $blog_id ));213 $details = WP_Site::get_instance( $blog_id ); 214 214 if ( ! $details ) { 215 215 // Set the full cache. … … 217 217 return false; 218 218 } 219 } 220 221 if ( ! $details instanceof WP_Site ) { 222 $details = new WP_Site( $details ); 219 223 } 220 224 … … 443 447 $domain_path_key = md5( $blog->domain . $blog->path ); 444 448 449 wp_cache_delete( $blog_id, 'sites' ); 445 450 wp_cache_delete( $blog_id , 'blog-details' ); 446 451 wp_cache_delete( $blog_id . 'short' , 'blog-details' ); … … 656 661 wp_cache_add_global_groups( $global_groups ); 657 662 } else { 658 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks' ) );663 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) ); 659 664 } 660 665 wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); -
trunk/src/wp-includes/ms-settings.php
r35782 r36393 13 13 /** WP_Network class */ 14 14 require_once( ABSPATH . WPINC . '/class-wp-network.php' ); 15 16 /** WP_Site class */ 17 require_once( ABSPATH . WPINC . '/class-wp-site.php' ); 15 18 16 19 /** Multisite loader */ … … 223 226 } 224 227 228 if ( ! $current_blog instanceof WP_Site ) { 229 $current_blog = new WP_Site( $current_blog ); 230 } 231 225 232 // Define upload directory constants 226 233 ms_upload_constants();
Note: See TracChangeset
for help on using the changeset viewer.