Changeset 1311

Show
Ignore:
Timestamp:
05/23/08 17:40:14 (5 months ago)
Author:
donncha
Message:

Shouldn't check for switching when we check for not switching inside ..

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/functions.php

    r1310 r1311  
    203203                return $pre; 
    204204 
     205        global $blog_id; 
     206        if( $wpdb->blogid != $blog_id && function_exists('error_log') ) { 
     207                $msg = "{$_SERVER[ 'HTTP_HOST' ]}{$_SERVER[ 'REQUEST_URI' ]} blog_id changed without calling switch_to_blog(). Current value: $blog_id"; 
     208                if( defined( 'ERRORLOGFILE' ) ) { 
     209                        error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ) ); 
     210                } else { 
     211                        error_log( $msg ); 
     212                } 
     213        } 
    205214        if ( $switched != false || defined('WP_INSTALLING') != false ) { 
    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                 } 
    215215                //wp_cache_delete($setting, 'options'); 
    216216                //wp_cache_delete('notoptions', 'options');