Skip to content
Browse files

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
  • Loading branch information...
1 parent 149ac73 commit 751a7d10eabfdd1c240e596e9b1fef10b4409c8b nacin committed Apr 5, 2010
Showing with 5 additions and 0 deletions.
  1. +3 −0 wp-includes/load.php
  2. +2 −0 wp-settings.php
View
3 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;
View
2 wp-settings.php
@@ -85,6 +85,8 @@
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.

0 comments on commit 751a7d1

Please sign in to comment.
Something went wrong with that request. Please try again.