Changeset 12885
- Timestamp:
- 01/28/2010 04:09:52 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/load.php
r12880 r12885 1 1 <?php 2 3 2 /** 4 3 * These functions are needed to load WordPress. -
trunk/wp-includes/ms-deprecated.php
r12868 r12885 15 15 /** 16 16 * @since unknown 17 * @deprecated 3.0 17 * @deprecated 3.0.0 18 18 * @deprecated Use wp_generate_password() 19 19 * @see wp_generate_password() … … 21 21 function generate_random_password( $len = 8 ) { 22 22 _deprecated_function( __FUNCTION__, '3.0', 'wp_generate_password()' ); 23 return wp_generate_password( $len);23 return wp_generate_password( $len ); 24 24 } 25 25 … … 33 33 * legacy function_exists() checks to determine if multisite is enabled. 34 34 * 35 * @since unknown36 * @deprecated 3.0 35 * @since MU 36 * @deprecated 3.0.0 37 37 * @deprecated Use is_super_admin() 38 38 * @see is_super_admin() … … 57 57 } 58 58 59 if ( !function_exists( 'graceful_fail') ) :59 if ( !function_exists( 'graceful_fail' ) ) : 60 60 /** 61 * @deprecated 3.0 61 * @since MU 62 * @deprecated 3.0.0 63 * @deprecated Use wp_die() 64 * @see wp_die() 62 65 */ 63 66 function graceful_fail( $message ) { 64 67 _deprecated_function( __FUNCTION__, '3.0', 'wp_die()' ); 65 $message = apply_filters( 'graceful_fail', $message);68 $message = apply_filters( 'graceful_fail', $message ); 66 69 $message_template = apply_filters( 'graceful_fail_template', 67 70 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … … 93 96 94 97 /** 95 * @deprecated 3.0 98 * @since MU 99 * @deprecated 3.0.0 100 * @deprecated Use $GLOBALS['current_user']->ID 96 101 */ 97 102 function get_current_user_id() { 98 _deprecated_function( __FUNCTION__, '3.0', '' ); 99 100 global $current_user; 101 return $current_user->ID; 103 _deprecated_function( __FUNCTION__, '3.0', '$GLOBALS\'current_user\']->ID' ); 104 return $GLOBALS['current_user']->ID; 102 105 } 103 106 104 107 /** 105 * @deprecated 3.0 108 * @since MU 109 * @deprecated 3.0.0 110 * @deprecated Use get_user_by() 111 * @see get_user_by() 106 112 */ 107 113 function get_user_details( $username ) { 108 114 _deprecated_function( __FUNCTION__, '3.0', 'get_user_by()' ); 109 110 115 return get_user_by('login', $username); 111 116 } 112 117 113 118 /** 114 * @deprecated 3.0 119 * @since MU 120 * @deprecated 3.0.0 121 * @deprecated Use clean_post_cache() 122 * @see clean_post_cache() 115 123 */ 116 124 function clear_global_post_cache( $post_id ) { 117 _deprecated_function( __FUNCTION__, '3.0', 'clean_post_cache ' );125 _deprecated_function( __FUNCTION__, '3.0', 'clean_post_cache()' ); 118 126 } 119 127 120 128 /** 121 * @deprecated 3.0 129 * @since MU 130 * @deprecated 3.0.0 131 * @deprecated Use is_main_site() 132 * @see is_main_site() 122 133 */ 123 134 function is_main_blog() { 124 _deprecated_function( __FUNCTION__, '3.0', 'is_main_site ' );135 _deprecated_function( __FUNCTION__, '3.0', 'is_main_site()' ); 125 136 return is_main_site(); 126 137 } 127 138 128 139 /** 129 * @deprecated 3.0 140 * @since MU 141 * @deprecated 3.0.0 142 * @deprecated Use is_email() 143 * @see is_email() 130 144 */ 131 145 function validate_email( $email, $check_domain = true) { -
trunk/wp-includes/ms-load.php
r12836 r12885 1 1 <?php 2 2 /** 3 * Used to setup and fix common variables and include 4 * the WordPress procedural and class library. 5 * 6 * You should not have to change this file and allows 7 * for some configuration in wp-config.php. 3 * These functions are needed to load Multisite. 4 * 5 * @since 3.0.0 6 * 7 * @package WordPress 8 * @subpackage Multisite 9 */ 10 11 /** 12 * Whether a subdomain configuration is enabled 8 13 * 9 14 * @since 3.0 10 15 * 11 * @ package WordPress16 * @return bool True if subdomain configuration is enabled, false otherwise. 12 17 */ 13 if ( defined( 'SUNRISE' ) ) 14 include_once( WP_CONTENT_DIR . '/sunrise.php' ); 15 16 require( ABSPATH . WPINC . '/ms-settings.php' ); 17 $wpdb->blogid = $current_blog->blog_id; 18 $wpdb->siteid = $current_blog->site_id; 19 $wpdb->set_prefix($table_prefix); // set up blog tables 20 $table_prefix = $wpdb->get_blog_prefix(); 21 22 // Fix empty PHP_SELF 23 $PHP_SELF = $_SERVER['PHP_SELF']; 24 if ( empty($PHP_SELF) || ( empty($PHP_SELF) && !is_subdomain_install() && $current_blog->path != '/' ) ) 25 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); 26 27 wp_cache_init(); // need to init cache again after blog_id is set 28 if ( function_exists('wp_cache_add_global_groups') ) { // need to add these again. Yes, it's an ugly hack 29 wp_cache_add_global_groups(array ('users', 'userlogins', 'usermeta', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss')); 30 wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' )); 31 } 32 33 if ( !defined( 'UPLOADBLOGSDIR' ) ) 34 define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); 35 36 if ( !defined( 'UPLOADS' ) ) 37 define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" ); 38 39 if ( !defined( 'BLOGUPLOADDIR' ) ) 40 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" ); 18 function is_subdomain_install() { 19 if ( defined('VHOST') && VHOST == 'yes' ) 20 return true; 21 22 return false; 23 } 41 24 42 25 function ms_network_settings() { … … 113 96 } 114 97 115 function ms_network_cookies() { 116 global $current_site; 117 /** 118 * It is possible to define this in wp-config.php 119 * @since 1.2.0 120 */ 121 if ( !defined( 'COOKIEPATH' ) ) 122 define( 'COOKIEPATH', $current_site->path ); 123 124 /** 125 * It is possible to define this in wp-config.php 126 * @since 1.5.0 127 */ 128 if ( !defined( 'SITECOOKIEPATH' ) ) 129 define( 'SITECOOKIEPATH', $current_site->path ); 130 131 /** 132 * It is possible to define this in wp-config.php 133 * @since 2.6.0 134 */ 135 if ( !defined( 'ADMIN_COOKIE_PATH' ) ) { 136 if( !is_subdomain_install() ) { 137 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); 98 function get_current_site_name( $current_site ) { 99 global $wpdb; 100 $current_site->site_name = wp_cache_get( $current_site->id . ':current_site_name', "site-options" ); 101 if ( !$current_site->site_name ) { 102 $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 ) ); 103 if ( $current_site->site_name == null ) 104 $current_site->site_name = ucfirst( $current_site->domain ); 105 wp_cache_set( $current_site->id . ':current_site_name', $current_site->site_name, 'site-options'); 106 } 107 return $current_site; 108 } 109 110 function wpmu_current_site() { 111 global $wpdb, $current_site, $domain, $path, $sites, $cookie_domain; 112 if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) { 113 $current_site->id = (defined( 'SITE_ID_CURRENT_SITE' ) ? constant('SITE_ID_CURRENT_SITE') : 1); 114 $current_site->domain = DOMAIN_CURRENT_SITE; 115 $current_site->path = $path = PATH_CURRENT_SITE; 116 if ( defined( 'BLOGID_CURRENT_SITE' ) ) 117 $current_site->blog_id = BLOGID_CURRENT_SITE; 118 if ( DOMAIN_CURRENT_SITE == $domain ) 119 $current_site->cookie_domain = $cookie_domain; 120 elseif ( substr( $current_site->domain, 0, 4 ) == 'www.' ) 121 $current_site->cookie_domain = substr( $current_site->domain, 4 ); 122 else 123 $current_site->cookie_domain = $current_site->domain; 124 125 return $current_site; 126 } 127 128 $current_site = wp_cache_get( "current_site", "site-options" ); 129 if ( $current_site ) 130 return $current_site; 131 132 $wpdb->suppress_errors(); 133 $sites = $wpdb->get_results( "SELECT * FROM $wpdb->site" ); // usually only one site 134 if ( count( $sites ) == 1 ) { 135 $current_site = $sites[0]; 136 $path = $current_site->path; 137 $current_site->blog_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain='{$current_site->domain}' AND path='{$current_site->path}'" ); 138 $current_site = get_current_site_name( $current_site ); 139 if ( substr( $current_site->domain, 0, 4 ) == 'www.' ) 140 $current_site->cookie_domain = substr( $current_site->domain, 4 ); 141 wp_cache_set( "current_site", $current_site, "site-options" ); 142 return $current_site; 143 } 144 $path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) ); 145 146 if ( $domain == $cookie_domain ) 147 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path = %s", $domain, $path ) ); 148 else 149 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain IN ( %s, %s ) AND path = %s ORDER BY CHAR_LENGTH( domain ) DESC LIMIT 1", $domain, $cookie_domain, $path ) ); 150 if ( $current_site == null ) { 151 if ( $domain == $cookie_domain ) 152 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path='/'", $domain ) ); 153 else 154 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain IN ( %s, %s ) AND path = '/' ORDER BY CHAR_LENGTH( domain ) DESC LIMIT 1", $domain, $cookie_domain, $path ) ); 155 } 156 if ( $current_site != null ) { 157 $path = $current_site->path; 158 $current_site->cookie_domain = $cookie_domain; 159 return $current_site; 160 } elseif ( is_subdomain_install() ) { 161 $sitedomain = substr( $domain, 1 + strpos( $domain, '.' ) ); 162 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path = %s", $sitedomain, $path) ); 163 if ( $current_site != null ) { 164 $current_site->cookie_domain = $current_site->domain; 165 return $current_site; 166 } 167 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path='/'", $sitedomain) ); 168 if ( $current_site == null && defined( "WP_INSTALLING" ) == false ) { 169 if ( count( $sites ) == 1 ) { 170 $current_site = $sites[0]; 171 die( "That blog does not exist. Please try <a href='http://{$current_site->domain}{$current_site->path}'>http://{$current_site->domain}{$current_site->path}</a>" ); 138 172 } else { 139 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin');173 die( "No WPMU site defined on this host. If you are the owner of this site, please check <a href='http://codex.wordpress.org/Debugging_WPMU'>Debugging WPMU</a> for further assistance." ); 140 174 } 141 } 142 /** 143 * It is possible to define this in wp-config.php 144 * @since 2.0.0 145 */ 146 if ( !defined('COOKIE_DOMAIN') ) 147 define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); 148 } 175 } else { 176 $path = '/'; 177 } 178 } elseif ( defined( "WP_INSTALLING" ) == false ) { 179 if ( count( $sites ) == 1 ) { 180 $current_site = $sites[0]; 181 die( "That blog does not exist. Please try <a href='http://{$current_site->domain}{$current_site->path}'>http://{$current_site->domain}{$current_site->path}</a>" ); 182 } else { 183 die( "No WPMU site defined on this host. If you are the owner of this site, please check <a href='http://codex.wordpress.org/Debugging_WPMU'>Debugging WPMU</a> for further assistance." ); 184 } 185 } else { 186 $path = '/'; 187 } 188 return $current_site; 189 } 190 191 function is_installed() { 192 global $wpdb, $domain, $path; 193 $base = stripslashes( $base ); 194 if ( defined( "WP_INSTALLING" ) == false ) { 195 $check = $wpdb->get_results( "SELECT * FROM $wpdb->site" ); 196 $msg = "If your blog does not display, please contact the owner of this site.<br /><br />If you are the owner of this site please check that MySQL is running properly and all tables are error free.<br /><br />"; 197 if ( $check == false ) { 198 $msg .= "<strong>Database Tables Missing.</strong><br />Database tables are missing. This means that MySQL is either not running, WPMU was not installed properly, or someone deleted {$wpdb->site}. You really <em>should</em> look at your database now.<br />"; 199 } else { 200 $msg .= '<strong>Could Not Find Blog!</strong><br />'; 201 $msg .= "Searched for <em>" . $domain . $path . "</em> in " . DB_NAME . "::" . $wpdb->blogs . " table. Is that right?<br />"; 202 } 203 $msg .= "<br />\n<h1>What do I do now?</h1>"; 204 $msg .= "Read the <a target='_blank' href='http://codex.wordpress.org/Debugging_WPMU'>bug report</a> page. Some of the guidelines there may help you figure out what went wrong.<br />"; 205 $msg .= "If you're still stuck with this message, then check that your database contains the following tables:<ul> 206 <li> $wpdb->blogs </li> 207 <li> $wpdb->users </li> 208 <li> $wpdb->usermeta </li> 209 <li> $wpdb->site </li> 210 <li> $wpdb->sitemeta </li> 211 <li> $wpdb->sitecategories </li> 212 </ul>"; 213 $msg .= "If you suspect a problem please report it to the support forums but you must include the information asked for in the <a href='http://codex.wordpress.org/Debugging_WPMU'>WPMU bug reporting guidelines</a>!<br /><br />"; 214 if ( is_file( 'release-info.txt' ) ) { 215 $msg .= 'Your bug report must include the following text: "'; 216 $info = file( 'release-info.txt' ); 217 $msg .= $info[ 4 ] . '"'; 218 } 219 220 die( "<h1>Fatal Error</h1> " . $msg ); 221 } 222 } 223 149 224 ?> -
trunk/wp-includes/ms-settings.php
r12858 r12885 1 1 <?php 2 /** 3 * Used to setup and fix common variables and include 4 * the Multisite procedural and class library. 5 * 6 * Allows for some configuration in wp-config.php (see ms-default-constants.php) 7 * 8 * @package WordPress 9 * @subpackage Multisite 10 */ 2 11 3 /** 4 * Whether a subdomain configuration is enabled 5 * 6 * @since 3.0 7 * 8 * @return bool True if subdomain configuration is enabled, false otherwise. 9 */ 10 function is_subdomain_install() { 11 if ( defined('VHOST') && VHOST == 'yes' ) 12 return true; 12 /** Include Multisite initialization functions */ 13 require( ABSPATH . WPINC . '/ms-load.php' ); 14 require( ABSPATH . WPINC . '/ms-default-constants.php' ); 13 15 14 return false; 15 } 16 if ( defined( 'SUNRISE' ) ) 17 include_once( WP_CONTENT_DIR . '/sunrise.php' ); 16 18 17 19 if ( isset( $current_site ) && isset( $current_blog ) ) 18 20 return; 19 20 // deprecated21 $wpmuBaseTablePrefix = $table_prefix;22 21 23 22 $domain = addslashes( $_SERVER['HTTP_HOST'] ); … … 45 44 $path = str_replace ( '/wp-admin/', '/', $path ); 46 45 $path = preg_replace( '|(/[a-z0-9-]+?/).*|', '$1', $path ); 47 48 function get_current_site_name( $current_site ) {49 global $wpdb;50 $current_site->site_name = wp_cache_get( $current_site->id . ':current_site_name', "site-options" );51 if ( !$current_site->site_name ) {52 $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 ) );53 if ( $current_site->site_name == null )54 $current_site->site_name = ucfirst( $current_site->domain );55 wp_cache_set( $current_site->id . ':current_site_name', $current_site->site_name, 'site-options');56 }57 return $current_site;58 }59 60 function wpmu_current_site() {61 global $wpdb, $current_site, $domain, $path, $sites, $cookie_domain;62 if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {63 $current_site->id = (defined( 'SITE_ID_CURRENT_SITE' ) ? constant('SITE_ID_CURRENT_SITE') : 1);64 $current_site->domain = DOMAIN_CURRENT_SITE;65 $current_site->path = $path = PATH_CURRENT_SITE;66 if ( defined( 'BLOGID_CURRENT_SITE' ) )67 $current_site->blog_id = BLOGID_CURRENT_SITE;68 if ( DOMAIN_CURRENT_SITE == $domain )69 $current_site->cookie_domain = $cookie_domain;70 elseif ( substr( $current_site->domain, 0, 4 ) == 'www.' )71 $current_site->cookie_domain = substr( $current_site->domain, 4 );72 else73 $current_site->cookie_domain = $current_site->domain;74 75 return $current_site;76 }77 78 $current_site = wp_cache_get( "current_site", "site-options" );79 if ( $current_site )80 return $current_site;81 82 $wpdb->suppress_errors();83 $sites = $wpdb->get_results( "SELECT * FROM $wpdb->site" ); // usually only one site84 if ( count( $sites ) == 1 ) {85 $current_site = $sites[0];86 $path = $current_site->path;87 $current_site->blog_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain='{$current_site->domain}' AND path='{$current_site->path}'" );88 $current_site = get_current_site_name( $current_site );89 if ( substr( $current_site->domain, 0, 4 ) == 'www.' )90 $current_site->cookie_domain = substr( $current_site->domain, 4 );91 wp_cache_set( "current_site", $current_site, "site-options" );92 return $current_site;93 }94 $path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) );95 96 if ( $domain == $cookie_domain )97 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path = %s", $domain, $path ) );98 else99 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain IN ( %s, %s ) AND path = %s ORDER BY CHAR_LENGTH( domain ) DESC LIMIT 1", $domain, $cookie_domain, $path ) );100 if ( $current_site == null ) {101 if ( $domain == $cookie_domain )102 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path='/'", $domain ) );103 else104 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain IN ( %s, %s ) AND path = '/' ORDER BY CHAR_LENGTH( domain ) DESC LIMIT 1", $domain, $cookie_domain, $path ) );105 }106 if ( $current_site != null ) {107 $path = $current_site->path;108 $current_site->cookie_domain = $cookie_domain;109 return $current_site;110 } elseif ( is_subdomain_install() ) {111 $sitedomain = substr( $domain, 1 + strpos( $domain, '.' ) );112 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path = %s", $sitedomain, $path) );113 if ( $current_site != null ) {114 $current_site->cookie_domain = $current_site->domain;115 return $current_site;116 }117 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path='/'", $sitedomain) );118 if ( $current_site == null && defined( "WP_INSTALLING" ) == false ) {119 if ( count( $sites ) == 1 ) {120 $current_site = $sites[0];121 die( "That blog does not exist. Please try <a href='http://{$current_site->domain}{$current_site->path}'>http://{$current_site->domain}{$current_site->path}</a>" );122 } else {123 die( "No WPMU site defined on this host. If you are the owner of this site, please check <a href='http://codex.wordpress.org/Debugging_WPMU'>Debugging WPMU</a> for further assistance." );124 }125 } else {126 $path = '/';127 }128 } elseif ( defined( "WP_INSTALLING" ) == false ) {129 if ( count( $sites ) == 1 ) {130 $current_site = $sites[0];131 die( "That blog does not exist. Please try <a href='http://{$current_site->domain}{$current_site->path}'>http://{$current_site->domain}{$current_site->path}</a>" );132 } else {133 die( "No WPMU site defined on this host. If you are the owner of this site, please check <a href='http://codex.wordpress.org/Debugging_WPMU'>Debugging WPMU</a> for further assistance." );134 }135 } else {136 $path = '/';137 }138 return $current_site;139 }140 46 141 47 $current_site = wpmu_current_site(); … … 171 77 } 172 78 173 if ( defined( "WP_INSTALLING" ) == false && is_subdomain_install() && !is_object( $current_blog ) ) { 79 if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && !is_object( $current_blog ) ) { 80 174 81 if ( defined( 'NOBLOGREDIRECT' ) ) { 175 82 $destination = constant( 'NOBLOGREDIRECT' ); … … 185 92 } 186 93 187 if ( defined( "WP_INSTALLING" ) == false) {94 if ( ! defined( 'WP_INSTALLING' ) ) { 188 95 if ( $current_site && $current_blog == null ) { 189 96 if ( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) { … … 236 143 } 237 144 238 function is_installed() { 239 global $wpdb, $domain, $path; 240 $base = stripslashes( $base ); 241 if ( defined( "WP_INSTALLING" ) == false ) { 242 $check = $wpdb->get_results( "SELECT * FROM $wpdb->site" ); 243 $msg = "If your blog does not display, please contact the owner of this site.<br /><br />If you are the owner of this site please check that MySQL is running properly and all tables are error free.<br /><br />"; 244 if ( $check == false ) { 245 $msg .= "<strong>Database Tables Missing.</strong><br />Database tables are missing. This means that MySQL is either not running, WPMU was not installed properly, or someone deleted {$wpdb->site}. You really <em>should</em> look at your database now.<br />"; 246 } else { 247 $msg .= '<strong>Could Not Find Blog!</strong><br />'; 248 $msg .= "Searched for <em>" . $domain . $path . "</em> in " . DB_NAME . "::" . $wpdb->blogs . " table. Is that right?<br />"; 249 } 250 $msg .= "<br />\n<h1>What do I do now?</h1>"; 251 $msg .= "Read the <a target='_blank' href='http://codex.wordpress.org/Debugging_WPMU'>bug report</a> page. Some of the guidelines there may help you figure out what went wrong.<br />"; 252 $msg .= "If you're still stuck with this message, then check that your database contains the following tables:<ul> 253 <li> $wpdb->blogs </li> 254 <li> $wpdb->users </li> 255 <li> $wpdb->usermeta </li> 256 <li> $wpdb->site </li> 257 <li> $wpdb->sitemeta </li> 258 <li> $wpdb->sitecategories </li> 259 </ul>"; 260 $msg .= "If you suspect a problem please report it to the support forums but you must include the information asked for in the <a href='http://codex.wordpress.org/Debugging_WPMU'>WPMU bug reporting guidelines</a>!<br /><br />"; 261 if ( is_file( 'release-info.txt' ) ) { 262 $msg .= 'Your bug report must include the following text: "'; 263 $info = file( 'release-info.txt' ); 264 $msg .= $info[ 4 ] . '"'; 265 } 145 $wpdb->blogid = $current_blog->blog_id; 146 $wpdb->siteid = $current_blog->site_id; 147 $wpdb->set_prefix($table_prefix); // set up blog tables 148 $table_prefix = $wpdb->get_blog_prefix(); 266 149 267 die( "<h1>Fatal Error</h1> " . $msg ); 268 } 150 // Fix empty PHP_SELF 151 $PHP_SELF = $_SERVER['PHP_SELF']; 152 if ( empty($PHP_SELF) || ( empty($PHP_SELF) && !is_subdomain_install() && $current_blog->path != '/' ) ) 153 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); 154 155 wp_cache_init(); // need to init cache again after blog_id is set 156 if ( function_exists('wp_cache_add_global_groups') ) { // need to add these again. Yes, it's an ugly hack 157 wp_cache_add_global_groups(array ('users', 'userlogins', 'usermeta', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss')); 158 wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' )); 269 159 } 270 160 161 ms_default_constants( 'uploads' ); 162 271 163 ?> -
trunk/wp-settings.php
r12847 r12885 76 76 // Initialize multisite if enabled. 77 77 if ( is_multisite() ) 78 require( ABSPATH . WPINC . '/ms- load.php' );78 require( ABSPATH . WPINC . '/ms-settings.php' ); 79 79 80 80 // Load early WordPress files. … … 163 163 } 164 164 unset($file); 165 ms_ network_cookies();165 ms_default_constants( 'cookies' ); 166 166 } 167 167
Note: See TracChangeset
for help on using the changeset viewer.