option to strip requested prefix index in the list
[lhc/web/wiklou.git] / maintenance / doMaintenance.php
index 10984b0..69b4b9c 100644 (file)
@@ -53,9 +53,9 @@ $maintenance->setup();
 // to $maintenance->mSelf. Keep that here for b/c
 $self = $maintenance->getName();
 
-// Detect compiled mode
 # Get the MWInit class
 require_once "$IP/includes/Init.php";
+# 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";
@@ -70,9 +70,14 @@ if ( file_exists( "$IP/StartProfiler.php" ) ) {
 require_once "$IP/includes/Defines.php";
 require_once MWInit::compiledPath( 'includes/DefaultSettings.php' );
 
+# Load composer's autoloader if present
+if ( is_readable( "$IP/vendor/autoload.php" ) ) {
+       require_once "$IP/vendor/autoload.php";
+}
+
 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
        # Use a callback function to configure MediaWiki
-       MWFunction::call( MW_CONFIG_CALLBACK );
+       call_user_func( MW_CONFIG_CALLBACK );
 } else {
        if ( file_exists( "$IP/../wmf-config/wikimedia-mode" ) ) {
                // Load settings, using wikimedia-mode if needed