Ticket #17522: ms-blogs.diff
File ms-blogs.diff, 1.5 KB (added by , 13 years ago) |
---|
-
wp-includes/ms-blogs.php
96 96 */ 97 97 function get_id_from_blogname( $name ) { 98 98 global $wpdb, $current_site; 99 $blog_id = wp_cache_get( "get_id_from_blogname_". $name, 'blog-details' );99 $blog_id = wp_cache_get( 'get_id_from_blogname_' . $name, 'blog-details' ); 100 100 if ( $blog_id ) 101 101 return $blog_id; 102 102 … … 331 331 function get_blog_option( $blog_id, $setting, $default = false ) { 332 332 global $wpdb; 333 333 334 $key = $blog_id. "-".$setting."-blog_option";335 $value = wp_cache_get( $key, "site-options");334 $key = $blog_id.'-'.$setting.'-blog_option'; 335 $value = wp_cache_get( $key, 'site-options' ); 336 336 if ( $value == null ) { 337 337 if ( $blog_id == $wpdb->blogid ) { 338 338 $value = get_option( $setting, $default ); … … 390 390 switch_to_blog($id); 391 391 add_option( $key, $value ); 392 392 restore_current_blog(); 393 wp_cache_set( $id. "-".$key."-blog_option", $value, 'site-options' );393 wp_cache_set( $id.'-'.$key.'-blog_option', $value, 'site-options' ); 394 394 } 395 395 396 396 /** … … 407 407 switch_to_blog($id); 408 408 delete_option( $key ); 409 409 restore_current_blog(); 410 wp_cache_set( $id. "-".$key."-blog_option", '', 'site-options' );410 wp_cache_set( $id.'-'.$key.'-blog_option', '', 'site-options' ); 411 411 } 412 412 413 413 /** … … 431 431 432 432 refresh_blog_details( $id ); 433 433 434 wp_cache_set( $id. "-".$key."-blog_option", $value, 'site-options');434 wp_cache_set( $id.'-'.$key.'-blog_option', $value, 'site-options'); 435 435 } 436 436 437 437 /**