White space clean-up. See #11644

git-svn-id: http://svn.automattic.com/wordpress/trunk@12773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-01-20 07:44:47 +00:00
parent da10910302
commit 6ad023b5e0
1 changed files with 68 additions and 68 deletions

View File

@ -10,10 +10,10 @@
* *
* @package WordPress * @package WordPress
*/ */
if( defined( 'SUNRISE' ) ) if ( defined( 'SUNRISE' ) )
include_once( WP_CONTENT_DIR . '/sunrise.php' ); include_once( WP_CONTENT_DIR . '/sunrise.php' );
require( ABSPATH . WPINC . '/ms-settings.php' ); require( ABSPATH . WPINC . '/ms-settings.php' );
$wpdb->blogid = $current_blog->blog_id; $wpdb->blogid = $current_blog->blog_id;
$wpdb->siteid = $current_blog->site_id; $wpdb->siteid = $current_blog->site_id;
$wpdb->set_prefix($table_prefix); // set up blog tables $wpdb->set_prefix($table_prefix); // set up blog tables
@ -30,22 +30,22 @@ if ( function_exists('wp_cache_add_global_groups') ) { // need to add these agai
wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' )); wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' ));
} }
if( !defined( "UPLOADBLOGSDIR" ) ) if ( !defined( 'UPLOADBLOGSDIR' ) )
define( "UPLOADBLOGSDIR", 'wp-content/blogs.dir' ); define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' );
if( !defined( "UPLOADS" ) ) if ( !defined( 'UPLOADS' ) )
define( "UPLOADS", UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" ); define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
if( !defined( "BLOGUPLOADDIR" ) ) if ( !defined( 'BLOGUPLOADDIR' ) )
define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" ); define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
function ms_network_settings() { function ms_network_settings() {
global $wpdb, $current_site, $cookiehash; global $wpdb, $current_site, $cookiehash;
if( !isset($current_site->site_name) ) if ( !isset($current_site->site_name) )
$current_site->site_name = get_site_option('site_name'); $current_site->site_name = get_site_option('site_name');
if( $current_site->site_name == false ) if ( $current_site->site_name == false )
$current_site->site_name = ucfirst( $current_site->domain ); $current_site->site_name = ucfirst( $current_site->domain );
$wpdb->hide_errors(); $wpdb->hide_errors();
@ -55,7 +55,7 @@ function ms_network_plugins() {
$network_plugins = array(); $network_plugins = array();
$deleted_sitewide_plugins = array(); $deleted_sitewide_plugins = array();
$wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'wpmu_sitewide_plugins' ) ); $wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'wpmu_sitewide_plugins' ) );
foreach( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) { foreach ( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) {
if ( !$plugin_file ) if ( !$plugin_file )
continue; continue;
@ -69,7 +69,7 @@ function ms_network_plugins() {
$active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) ); $active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
/* Remove any deleted plugins from the wpmu_sitewide_plugins array */ /* Remove any deleted plugins from the wpmu_sitewide_plugins array */
foreach( $deleted_sitewide_plugins as $plugin_file ) { foreach ( $deleted_sitewide_plugins as $plugin_file ) {
unset( $wpmu_sitewide_plugins[$plugin_file] ); unset( $wpmu_sitewide_plugins[$plugin_file] );
unset( $active_sitewide_plugins[$plugin_file] ); unset( $active_sitewide_plugins[$plugin_file] );
} }
@ -82,70 +82,70 @@ function ms_network_plugins() {
} }
function ms_site_check() { function ms_site_check() {
global $wpdb, $current_blog; global $wpdb, $current_blog;
$wpdb->show_errors(); $wpdb->show_errors();
if ( '1' == $current_blog->deleted ) { if ( '1' == $current_blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) { if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
return WP_CONTENT_DIR . '/blog-deleted.php'; return WP_CONTENT_DIR . '/blog-deleted.php';
} else { } else {
header('HTTP/1.1 410 Gone'); header('HTTP/1.1 410 Gone');
graceful_fail(__('This user has elected to delete their account and the content is no longer available.')); graceful_fail(__('This user has elected to delete their account and the content is no longer available.'));
} }
} }
if ( '2' == $current_blog->deleted ) { if ( '2' == $current_blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) { if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
return WP_CONTENT_DIR . '/blog-inactive.php'; return WP_CONTENT_DIR . '/blog-inactive.php';
} else { } else {
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}" ) ) ) ); 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}" ) ) ) );
} }
} }
if( $current_blog->archived == '1' || $current_blog->spam == '1' ) { if( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) { if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {
return WP_CONTENT_DIR . '/blog-suspended.php'; return WP_CONTENT_DIR . '/blog-suspended.php';
} else { } else {
header('HTTP/1.1 410 Gone'); header('HTTP/1.1 410 Gone');
graceful_fail(__('This blog has been archived or suspended.')); graceful_fail(__('This blog has been archived or suspended.'));
} }
} }
return true; return true;
} }
function ms_network_cookies() { function ms_network_cookies() {
global $current_site; global $current_site;
/** /**
* It is possible to define this in wp-config.php * It is possible to define this in wp-config.php
* @since 1.2.0 * @since 1.2.0
*/ */
if ( !defined('COOKIEPATH') ) if ( !defined( 'COOKIEPATH' ) )
define('COOKIEPATH', $current_site->path ); define( 'COOKIEPATH', $current_site->path );
/** /**
* It is possible to define this in wp-config.php * It is possible to define this in wp-config.php
* @since 1.5.0 * @since 1.5.0
*/ */
if ( !defined('SITECOOKIEPATH') ) if ( !defined( 'SITECOOKIEPATH' ) )
define('SITECOOKIEPATH', $current_site->path ); define( 'SITECOOKIEPATH', $current_site->path );
/** /**
* It is possible to define this in wp-config.php * It is possible to define this in wp-config.php
* @since 2.6.0 * @since 2.6.0
*/ */
if ( !defined('ADMIN_COOKIE_PATH') ) { if ( !defined( 'ADMIN_COOKIE_PATH' ) ) {
if( !is_subdomain_install() ) { if( !is_subdomain_install() ) {
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
} else { } else {
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
} }
} }
/** /**
* It is possible to define this in wp-config.php * It is possible to define this in wp-config.php
* @since 2.0.0 * @since 2.0.0
*/ */
if ( !defined('COOKIE_DOMAIN') ) if ( !defined('COOKIE_DOMAIN') )
define('COOKIE_DOMAIN', '.' . $current_site->domain); define('COOKIE_DOMAIN', '.' . $current_site->domain);
} }
?> ?>