Prevent half-baked loading of MS that would happen when constants are added into wp-config below the wp-settings include. Now it would error on the redefinition of the MULTISITE constant, instead of vague errors, and prevent any MS from loading. see #12848

git-svn-id: http://svn.automattic.com/wordpress/trunk@14000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-05 00:00:13 +00:00
parent 149ac73766
commit 751a7d10ea
2 changed files with 5 additions and 0 deletions

View File

@ -568,6 +568,9 @@ function is_admin() {
* @return bool True if multisite is enabled, false otherwise.
*/
function is_multisite() {
if ( defined( 'MULTISITE' ) && ! MULTISITE )
return false;
if ( ( defined( 'MULTISITE' ) && MULTISITE ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )
return true;

View File

@ -85,6 +85,8 @@ require( ABSPATH . WPINC . '/pomo/mo.php' );
if ( is_multisite() ) {
require( ABSPATH . WPINC . '/ms-blogs.php' );
require( ABSPATH . WPINC . '/ms-settings.php' );
} elseif ( ! defined( 'MULTISITE' ) ) {
define( 'MULTISITE', false );
}
// Stop most of WordPress from being loaded if we just want the basics.