Make WordPress Core


Ignore:
Timestamp:
10/04/2012 12:40:09 PM (13 years ago)
Author:
ryan
Message:

Reduce use of global. Use get_blog_details() instead. fixes #22090

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-load.php

    r19760 r22108  
    7070 */
    7171function ms_site_check() {
    72     global $wpdb, $current_blog;
     72    global $wpdb;
     73
     74    $blog = get_blog_details();
    7375
    7476    // Allow short-circuiting
     
    8183        return true;
    8284
    83     if ( '1' == $current_blog->deleted ) {
     85    if ( '1' == $blog->deleted ) {
    8486        if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
    8587            return WP_CONTENT_DIR . '/blog-deleted.php';
     
    8890    }
    8991
    90     if ( '2' == $current_blog->deleted ) {
     92    if ( '2' == $blog->deleted ) {
    9193        if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
    9294            return WP_CONTENT_DIR . '/blog-inactive.php';
     
    9597    }
    9698
    97     if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
     99    if ( $blog->archived == '1' || $blog->spam == '1' ) {
    98100        if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) )
    99101            return WP_CONTENT_DIR . '/blog-suspended.php';
Note: See TracChangeset for help on using the changeset viewer.