WordPress.org

Make WordPress Core

Changeset 12773


Ignore:
Timestamp:
01/20/2010 07:44:47 AM (11 years ago)
Author:
dd32
Message:

White space clean-up. See #11644

File:
1 edited

Legend:

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

    r12772 r12773  
    1111 * @package WordPress
    1212 */
    13 if( defined( 'SUNRISE' ) )
     13if ( defined( 'SUNRISE' ) )
    1414    include_once( WP_CONTENT_DIR . '/sunrise.php' );
    1515
    16     require( ABSPATH . WPINC . '/ms-settings.php' );
     16require( ABSPATH . WPINC . '/ms-settings.php' );
    1717$wpdb->blogid = $current_blog->blog_id;
    1818$wpdb->siteid = $current_blog->site_id;
     
    3131}
    3232
    33 if( !defined( "UPLOADBLOGSDIR" ) )
    34     define( "UPLOADBLOGSDIR", 'wp-content/blogs.dir' );
     33if ( !defined( 'UPLOADBLOGSDIR' ) )
     34    define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' );
    3535
    36 if( !defined( "UPLOADS" ) )
    37     define( "UPLOADS", UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
     36if ( !defined( 'UPLOADS' ) )
     37    define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
    3838
    39 if( !defined( "BLOGUPLOADDIR" ) )
    40     define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
     39if ( !defined( 'BLOGUPLOADDIR' ) )
     40    define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
    4141
    4242function ms_network_settings() {
    4343    global $wpdb, $current_site, $cookiehash;
    4444
    45     if( !isset($current_site->site_name) )
     45    if ( !isset($current_site->site_name) )
    4646        $current_site->site_name = get_site_option('site_name');
    4747
    48     if( $current_site->site_name == false )
     48    if ( $current_site->site_name == false )
    4949        $current_site->site_name = ucfirst( $current_site->domain );
    5050
     
    5656    $deleted_sitewide_plugins = array();
    5757    $wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'wpmu_sitewide_plugins' ) );
    58     foreach( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) {
     58    foreach ( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) {
    5959        if ( !$plugin_file )
    6060            continue;
     
    7070
    7171        /* Remove any deleted plugins from the wpmu_sitewide_plugins array */
    72         foreach( $deleted_sitewide_plugins as $plugin_file ) {
     72        foreach ( $deleted_sitewide_plugins as $plugin_file ) {
    7373            unset( $wpmu_sitewide_plugins[$plugin_file] );
    7474            unset( $active_sitewide_plugins[$plugin_file] );
     
    8383
    8484function ms_site_check() {
    85         global $wpdb, $current_blog;
     85    global $wpdb, $current_blog;
    8686
    87         $wpdb->show_errors();
     87    $wpdb->show_errors();
    8888
    89         if ( '1' == $current_blog->deleted ) {
    90                 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
    91                         return WP_CONTENT_DIR . '/blog-deleted.php';
    92                 } else {
    93                         header('HTTP/1.1 410 Gone');
    94                         graceful_fail(__('This user has elected to delete their account and the content is no longer available.'));
    95                 }
    96         }
     89    if ( '1' == $current_blog->deleted ) {
     90            if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
     91                    return WP_CONTENT_DIR . '/blog-deleted.php';
     92            } else {
     93                    header('HTTP/1.1 410 Gone');
     94                    graceful_fail(__('This user has elected to delete their account and the content is no longer available.'));
     95            }
     96    }
    9797
    98         if ( '2' == $current_blog->deleted ) {
    99                 if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
    100                         return WP_CONTENT_DIR . '/blog-inactive.php';
    101                 } else {
    102                         graceful_fail( sprintf( __( 'This blog has not been activated yet. If you are having problems activating your blog, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );
    103                 }
    104         }
     98    if ( '2' == $current_blog->deleted ) {
     99            if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
     100                    return WP_CONTENT_DIR . '/blog-inactive.php';
     101            } else {
     102                    graceful_fail( sprintf( __( 'This blog has not been activated yet. If you are having problems activating your blog, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );
     103            }
     104    }
    105105
    106         if( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
    107                 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {
    108                         return WP_CONTENT_DIR . '/blog-suspended.php';
    109                 } else {
    110                         header('HTTP/1.1 410 Gone');
    111                         graceful_fail(__('This blog has been archived or suspended.'));
    112                 }
    113         }
    114         return true;
     106    if( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
     107            if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {
     108                    return WP_CONTENT_DIR . '/blog-suspended.php';
     109            } else {
     110                    header('HTTP/1.1 410 Gone');
     111                    graceful_fail(__('This blog has been archived or suspended.'));
     112            }
     113    }
     114    return true;
    115115}
    116116
    117117function ms_network_cookies() {
    118         global $current_site;
    119         /**
    120         * It is possible to define this in wp-config.php
    121         * @since 1.2.0
    122         */
    123         if ( !defined('COOKIEPATH') )
    124                 define('COOKIEPATH', $current_site->path );
     118    global $current_site;
     119    /**
     120    * It is possible to define this in wp-config.php
     121    * @since 1.2.0
     122    */
     123    if ( !defined( 'COOKIEPATH' ) )
     124            define( 'COOKIEPATH', $current_site->path );
    125125
    126         /**
    127         * It is possible to define this in wp-config.php
    128         * @since 1.5.0
    129         */
    130         if ( !defined('SITECOOKIEPATH') )
    131                 define('SITECOOKIEPATH', $current_site->path );
     126    /**
     127    * It is possible to define this in wp-config.php
     128    * @since 1.5.0
     129    */
     130    if ( !defined( 'SITECOOKIEPATH' ) )
     131            define( 'SITECOOKIEPATH', $current_site->path );
    132132
    133         /**
    134         * It is possible to define this in wp-config.php
    135         * @since 2.6.0
    136         */
    137         if ( !defined('ADMIN_COOKIE_PATH') ) {
    138                 if( !is_subdomain_install() ) {
    139                         define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
    140                 } else {
    141                         define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
    142                 }
    143         }
    144         /**
    145         * It is possible to define this in wp-config.php
    146         * @since 2.0.0
    147         */
    148         if ( !defined('COOKIE_DOMAIN') )
    149                 define('COOKIE_DOMAIN', '.' . $current_site->domain);
     133    /**
     134    * It is possible to define this in wp-config.php
     135    * @since 2.6.0
     136    */
     137    if ( !defined( 'ADMIN_COOKIE_PATH' ) ) {
     138            if( !is_subdomain_install() ) {
     139                    define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
     140            } else {
     141                    define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
     142            }
     143    }
     144    /**
     145    * It is possible to define this in wp-config.php
     146    * @since 2.0.0
     147    */
     148    if ( !defined('COOKIE_DOMAIN') )
     149            define('COOKIE_DOMAIN', '.' . $current_site->domain);
    150150}
    151151?>
Note: See TracChangeset for help on using the changeset viewer.