Changeset 12773 for trunk/wp-includes/ms-load.php
- Timestamp:
- 01/20/2010 07:44:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-load.php
r12772 r12773 11 11 * @package WordPress 12 12 */ 13 if ( defined( 'SUNRISE' ) )13 if ( defined( 'SUNRISE' ) ) 14 14 include_once( WP_CONTENT_DIR . '/sunrise.php' ); 15 15 16 16 require( ABSPATH . WPINC . '/ms-settings.php' ); 17 17 $wpdb->blogid = $current_blog->blog_id; 18 18 $wpdb->siteid = $current_blog->site_id; … … 31 31 } 32 32 33 if ( !defined( "UPLOADBLOGSDIR") )34 define( "UPLOADBLOGSDIR", 'wp-content/blogs.dir' );33 if ( !defined( 'UPLOADBLOGSDIR' ) ) 34 define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); 35 35 36 if ( !defined( "UPLOADS") )37 define( "UPLOADS", UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );36 if ( !defined( 'UPLOADS' ) ) 37 define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" ); 38 38 39 if ( !defined( "BLOGUPLOADDIR") )40 define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );39 if ( !defined( 'BLOGUPLOADDIR' ) ) 40 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" ); 41 41 42 42 function ms_network_settings() { 43 43 global $wpdb, $current_site, $cookiehash; 44 44 45 if ( !isset($current_site->site_name) )45 if ( !isset($current_site->site_name) ) 46 46 $current_site->site_name = get_site_option('site_name'); 47 47 48 if ( $current_site->site_name == false )48 if ( $current_site->site_name == false ) 49 49 $current_site->site_name = ucfirst( $current_site->domain ); 50 50 … … 56 56 $deleted_sitewide_plugins = array(); 57 57 $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 ) { 59 59 if ( !$plugin_file ) 60 60 continue; … … 70 70 71 71 /* 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 ) { 73 73 unset( $wpmu_sitewide_plugins[$plugin_file] ); 74 74 unset( $active_sitewide_plugins[$plugin_file] ); … … 83 83 84 84 function ms_site_check() { 85 85 global $wpdb, $current_blog; 86 86 87 87 $wpdb->show_errors(); 88 88 89 90 91 92 93 94 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 } 97 97 98 99 100 101 102 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 } 105 105 106 107 108 109 110 111 112 113 114 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; 115 115 } 116 116 117 117 function ms_network_cookies() { 118 119 120 121 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 ); 125 125 126 127 128 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 ); 132 132 133 134 135 136 137 if ( !defined('ADMIN_COOKIE_PATH') ) {138 139 140 141 142 143 144 145 146 147 148 149 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); 150 150 } 151 151 ?>
Note: See TracChangeset
for help on using the changeset viewer.