Consolidate parts of WebStart.php and doMaintenance.php into Initialize.php
[lhc/web/wiklou.git] / maintenance / doMaintenance.php
index 47e6a89..3ffee10 100644 (file)
@@ -53,41 +53,12 @@ $maintenance->setup();
 // to $maintenance->mSelf. Keep that here for b/c
 $self = $maintenance->getName();
 
-# Start the autoloader, so that extensions can derive classes from core files
-require_once "$IP/includes/AutoLoader.php";
-# Stub the profiler
-require_once "$IP/includes/profiler/Profiler.php";
-
-# Start the profiler
-$wgProfiler = array();
-if ( file_exists( "$IP/StartProfiler.php" ) ) {
-       require "$IP/StartProfiler.php";
-}
-
-// Some other requires
-require_once "$IP/includes/Defines.php";
-require_once "$IP/includes/DefaultSettings.php";
-
-# Load composer's autoloader if present
-if ( is_readable( "$IP/vendor/autoload.php" ) ) {
-       require_once "$IP/vendor/autoload.php";
-}
+require_once "$IP/includes/Initialize.php";
 
 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
        # Use a callback function to configure MediaWiki
        call_user_func( MW_CONFIG_CALLBACK );
 } else {
-       if ( file_exists( "$IP/../wmf-config/wikimedia-mode" ) ) {
-               // Load settings, using wikimedia-mode if needed
-               // @todo FIXME: Replace this hack with general farm-friendly code
-               # @todo FIXME: Wikimedia-specific stuff needs to go away to an ext
-               # Maybe a hook?
-               // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
-               global $cluster;
-               $cluster = 'pmtpa';
-               // @codingStandardsIgnoreEnd
-               require "$IP/../wmf-config/wgConf.php";
-       }
        // Require the configuration (probably LocalSettings.php)
        require $maintenance->loadSettings();
 }