From 1fa9e99992058b8c701a9c68f49f2ef0fdf1234a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 5 Apr 2010 00:00:13 +0000 Subject: [PATCH] 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: https://develop.svn.wordpress.org/trunk@14000 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/load.php | 3 +++ wp-settings.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/wp-includes/load.php b/wp-includes/load.php index 311643f47f..f036a5a2b9 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -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; diff --git a/wp-settings.php b/wp-settings.php index 8437cfb38c..197ecae177 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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.