Changeset 1310
- Timestamp:
- 05/23/08 17:31:51 (3 months ago)
- Files:
-
- trunk/wp-includes/functions.php (modified) (1 diff)
- trunk/wp-includes/wpmu-functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/functions.php
r1294 r1310 204 204 205 205 if ( $switched != false || defined('WP_INSTALLING') != false ) { 206 wp_cache_delete($setting, 'options'); 207 wp_cache_delete('notoptions', 'options'); 208 wp_cache_delete('alloptions', 'options'); 206 global $blog_id, $switched_to; 207 if( $switched_to != $blog_id && function_exists('error_log') ) { 208 $msg = "{$_SERVER[ 'HTTP_HOST' ]}{$_SERVER[ 'REQUEST_URI' ]} blog_id changed without calling switch_to_blog(). Current value: $blog_id"; 209 if( defined( 'ERRORLOGFILE' ) ) { 210 error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ) ); 211 } else { 212 error_log( $msg ); 213 } 214 } 215 //wp_cache_delete($setting, 'options'); 216 //wp_cache_delete('notoptions', 'options'); 217 //wp_cache_delete('alloptions', 'options'); 209 218 } 210 219 trunk/wp-includes/wpmu-functions.php
r1308 r1310 323 323 324 324 function switch_to_blog( $new_blog ) { 325 global $wpdb, $table_prefix, $blog_id, $switched, $switched_stack, $wp_roles, $current_user, $wp_object_cache ;325 global $wpdb, $table_prefix, $blog_id, $switched, $switched_stack, $wp_roles, $current_user, $wp_object_cache, $switched_to; 326 326 327 327 if ( empty($new_blog) ) … … 340 340 $prev_blog_id = $blog_id; 341 341 $blog_id = $new_blog; 342 $switched_to = $blog_id; 342 343 343 344 if( is_object( $wp_roles ) ) { … … 355 356 356 357 function restore_current_blog() { 357 global $table_prefix, $wpdb, $blog_id, $switched, $switched_stack, $wp_roles, $current_user, $wp_object_cache ;358 global $table_prefix, $wpdb, $blog_id, $switched, $switched_stack, $wp_roles, $current_user, $wp_object_cache, $switched_to; 358 359 359 360 if ( !$switched ) … … 368 369 $blog_id = $blog; 369 370 $table_prefix = $wpdb->prefix; 371 $switched_to = $blog_id; 370 372 371 373 if( is_object( $wp_roles ) ) {
