Changes from trunk/wp-includes/ms-load.php at r16906 to branches/3.0/wp-includes/ms-load.php at r15369
- File:
-
- 1 edited
-
branches/3.0/wp-includes/ms-load.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-includes/ms-load.php
r16906 r15369 24 24 25 25 return false; 26 }27 28 /**29 * Returns array of network plugin files to be included in global scope.30 *31 * The default directory is wp-content/plugins. To change the default directory32 * manually, define <code>WP_PLUGIN_DIR</code> and <code>WP_PLUGIN_URL</code>33 * in wp-config.php.34 *35 * @access private36 * @since 3.1.037 * @return array Files to include38 */39 function wp_get_active_network_plugins() {40 $active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );41 if ( empty( $active_plugins ) )42 return array();43 44 $plugins = array();45 $active_plugins = array_keys( $active_plugins );46 sort( $active_plugins );47 48 foreach ( $active_plugins as $plugin ) {49 if ( ! validate_file( $plugin ) // $plugin must validate as file50 && '.php' == substr( $plugin, -4 ) // $plugin must end with '.php'51 && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist52 )53 $plugins[] = WP_PLUGIN_DIR . '/' . $plugin;54 }55 return $plugins;56 26 } 57 27 … … 82 52 83 53 if ( '1' == $current_blog->deleted ) { 84 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) 54 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) { 85 55 return WP_CONTENT_DIR . '/blog-deleted.php'; 86 else 87 wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) ); 56 } else { 57 header( 'HTTP/1.1 410 Gone' ); 58 wp_die( /*WP_I18N_USER_DELETED_BLOG*/'This user has elected to delete their account and the content is no longer available.'/*/WP_I18N_USER_DELETED_BLOG*/ ); 59 } 88 60 } 89 61 … … 92 64 return WP_CONTENT_DIR . '/blog-inactive.php'; 93 65 else 94 wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );66 wp_die( sprintf( /*WP_I18N_BLOG_NOT_ACTIVATED*/'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.'/*/WP_I18N_BLOG_NOT_ACTIVATED*/, str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); 95 67 } 96 68 97 69 if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) { 98 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) 70 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) { 99 71 return WP_CONTENT_DIR . '/blog-suspended.php'; 100 else 101 wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) ); 72 } else { 73 header( 'HTTP/1.1 410 Gone' ); 74 wp_die( /*WP_I18N_ARCHIVED*/'This site has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ ); 75 } 102 76 } 103 77 … … 114 88 function get_current_site_name( $current_site ) { 115 89 global $wpdb; 116 117 $current_site->site_name = wp_cache_get( $current_site->id . ':site_name', 'site-options' ); 90 $current_site->site_name = wp_cache_get( $current_site->id . ':current_site_name', 'site-options' ); 118 91 if ( ! $current_site->site_name ) { 119 $current_site->site_name = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = %d AND meta_key = 'site_name'", $current_site->id ) ); 120 if ( ! $current_site->site_name ) 121 $current_site->site_name = ucfirst( $current_site->domain ); 122 } 123 wp_cache_set( $current_site->id . ':site_name', $current_site->site_name, 'site-options' ); 124 92 $current_site->site_name = wp_cache_get( $current_site->id . ':site_name', 'site-options' ); 93 if ( ! $current_site->site_name ) { 94 $current_site->site_name = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = %d AND meta_key = 'site_name'", $current_site->id ) ); 95 if ( ! $current_site->site_name ) 96 $current_site->site_name = ucfirst( $current_site->domain ); 97 } 98 wp_cache_set( $current_site->id . ':current_site_name', $current_site->site_name, 'site-options' ); 99 } 125 100 return $current_site; 126 101 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)