Changeset 12762 for trunk/wp-includes/ms-load.php
- Timestamp:
- 01/19/2010 05:27:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-load.php
r12730 r12762 14 14 include_once( WP_CONTENT_DIR . '/sunrise.php' ); 15 15 16 require (ABSPATH . WPINC . '/ms-settings.php');17 $wpdb->blogid 18 $wpdb->siteid 16 require( ABSPATH . WPINC . '/ms-settings.php' ); 17 $wpdb->blogid = $current_blog->blog_id; 18 $wpdb->siteid = $current_blog->site_id; 19 19 $wpdb->set_prefix($table_prefix); // set up blog tables 20 20 $table_prefix = $wpdb->get_blog_prefix(); … … 41 41 42 42 function ms_network_settings() { 43 43 global $wpdb, $current_site, $cookiehash; 44 44 45 46 45 if( !isset($current_site->site_name) ) 46 $current_site->site_name = get_site_option('site_name'); 47 47 48 49 48 if( $current_site->site_name == false ) 49 $current_site->site_name = ucfirst( $current_site->domain ); 50 50 51 if ( ! defined('WP_INSTALLING') ) { 52 // Used to guarantee unique hash cookies 53 if ( !isset($cookiehash) ) 54 $cookiehash = ''; 51 if ( ! defined('WP_INSTALLING') ) { 52 if ( !isset($cookiehash) ) 53 $cookiehash = ''; 55 54 56 57 58 59 60 61 62 55 /** 56 * Used to guarantee unique hash cookies 57 * @since 1.5 58 */ 59 if ( !defined('COOKIEHASH') ) 60 define( 'COOKIEHASH', $cookiehash ); 61 } 63 62 64 63 $wpdb->hide_errors(); 65 64 } 66 65 67 66 function ms_network_plugins() { 68 $wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'wpmu_sitewide_plugins' ) ); 69 foreach( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) { 70 if ( !$plugin_file ) 71 continue; 67 $network_plugins = array(); 68 $wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'wpmu_sitewide_plugins' ) ); 69 foreach( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) { 70 if ( !$plugin_file ) 71 continue; 72 72 73 74 75 76 include_once( WP_PLUGIN_DIR . '/' . $plugin_file );77 78 73 if ( !file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { 74 $deleted_sitewide_plugins[] = $plugin_file; 75 } else { 76 $network_plugins = WP_PLUGIN_DIR . '/' . $plugin_file; 77 } 78 } 79 79 80 81 80 if ( isset( $deleted_sitewide_plugins ) ) { 81 $active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) ); 82 82 83 84 85 86 87 83 /* Remove any deleted plugins from the wpmu_sitewide_plugins array */ 84 foreach( $deleted_sitewide_plugins as $plugin_file ) { 85 unset( $wpmu_sitewide_plugins[$plugin_file] ); 86 unset( $active_sitewide_plugins[$plugin_file] ); 87 } 88 88 89 90 91 89 update_site_option( 'wpmu_sitewide_plugins', $wpmu_sitewide_plugins ); 90 update_site_option( 'active_sitewide_plugins', $wpmu_sitewide_plugins ); 91 } 92 92 93 return $network_plugins; 93 94 } 94 95 … … 100 101 if ( '1' == $current_blog->deleted ) { 101 102 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) { 102 require_once( WP_CONTENT_DIR . '/blog-deleted.php' ); 103 die(); 103 return WP_CONTENT_DIR . '/blog-deleted.php'; 104 104 } else { 105 105 header('HTTP/1.1 410 Gone'); … … 110 110 if ( '2' == $current_blog->deleted ) { 111 111 if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) { 112 require_once( WP_CONTENT_DIR . '/blog-inactive.php' ); 113 die(); 112 return WP_CONTENT_DIR . '/blog-inactive.php'; 114 113 } else { 115 114 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}" ) ) ) ); … … 119 118 if( $current_blog->archived == '1' || $current_blog->spam == '1' ) { 120 119 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) { 121 require_once( WP_CONTENT_DIR . '/blog-suspended.php' ); 122 die(); 120 return WP_CONTENT_DIR . '/blog-suspended.php'; 123 121 } else { 124 122 header('HTTP/1.1 410 Gone'); … … 126 124 } 127 125 } 126 return true; 128 127 } 129 128
Note: See TracChangeset
for help on using the changeset viewer.