Merge "Remove check for MW_NO_SETUP"
[lhc/web/wiklou.git] / includes / Setup.php
index 7cda14c..94da424 100644 (file)
@@ -36,8 +36,10 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 $fname = 'Setup.php';
 $ps_setup = Profiler::instance()->scopedProfileIn( $fname );
 
-// If any extensions are still queued, force load them
+// Load queued extensions
 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 ) ) {
@@ -462,7 +464,7 @@ if ( $wgMaximalPasswordLength !== false ) {
 }
 
 // Backwards compatibility warning
-if ( !$wgSessionsInObjectCache && !$wgSessionsInMemcached ) {
+if ( !$wgSessionsInObjectCache ) {
        wfDeprecated( '$wgSessionsInObjectCache = false', '1.27' );
        if ( $wgSessionHandler ) {
                wfDeprecated( '$wgSessionsHandler', '1.27' );
@@ -497,10 +499,6 @@ if ( $wgDebugToolbar && !$wgCommandLineMode ) {
        MWDebug::init();
 }
 
-if ( !class_exists( 'AutoLoader' ) ) {
-       require_once "$IP/includes/AutoLoader.php";
-}
-
 // Reset the global service locator, so any services that have already been created will be
 // re-created while taking into account any custom settings and extensions.
 MediaWikiServices::resetGlobalInstance( new GlobalVarConfig(), 'quick' );
@@ -818,7 +816,9 @@ $wgOut = RequestContext::getMain()->getOutput(); // BackCompat
 /**
  * @var Parser $wgParser
  */
-$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], [ $wgParserConf ] );
+$wgParser = new StubObject( 'wgParser', function () {
+       return MediaWikiServices::getInstance()->getParser();
+} );
 
 /**
  * @var Title $wgTitle
@@ -876,7 +876,6 @@ if ( !$wgCommandLineMode ) {
        Pingback::schedulePingback();
 }
 
-wfDebug( "Fully initialised\n" );
 $wgFullyInitialised = true;
 
 Profiler::instance()->scopedProfileOut( $ps_extensions );