Merge "Avoid global $wgUpdateRowsPerQuery in WatchedItemStore"
[lhc/web/wiklou.git] / includes / Setup.php
index c015eac..bdfce62 100644 (file)
@@ -35,6 +35,14 @@ if ( !defined( 'MEDIAWIKI' ) ) {
        exit( 1 );
 }
 
+// Check to see if we are at the file scope
+$wgScopeTest = 'MediaWiki Setup.php scope test';
+if ( !isset( $GLOBALS['wgScopeTest'] ) || $GLOBALS['wgScopeTest'] !== $wgScopeTest ) {
+       echo "Error, Setup.php must be included from the file scope.\n";
+       die( 1 );
+}
+unset( $wgScopeTest );
+
 /**
  * Pre-config setup: Before loading LocalSettings.php
  */
@@ -86,11 +94,6 @@ MediaWiki\HeaderCallback::register();
  * Load LocalSettings.php
  */
 
-if ( is_readable( "$IP/StartProfiler.php" ) ) {
-       // @deprecated since 1.32: Use LocalSettings.php instead.
-       require "$IP/StartProfiler.php";
-}
-
 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
        call_user_func( MW_CONFIG_CALLBACK );
 } else {
@@ -123,12 +126,6 @@ ExtensionRegistry::getInstance()->loadFromQueue();
 // Don't let any other extensions load
 ExtensionRegistry::getInstance()->finish();
 
-// Check to see if we are at the file scope
-if ( !isset( $wgVersion ) ) {
-       echo "Error, Setup.php must be included from the file scope, after DefaultSettings.php\n";
-       die( 1 );
-}
-
 mb_internal_encoding( 'UTF-8' );
 
 // Set the configured locale on all requests for consisteny