From 214931ed33124a36e01e105c41c7d7e4797bde82 Mon Sep 17 00:00:00 2001 From: withoutaname Date: Sun, 24 Aug 2014 14:26:14 -0700 Subject: [PATCH] Consolidate parts of WebStart.php and doMaintenance.php into Initialize.php Some of the various code used to initialize MediaWiki were combined into a single file. Change-Id: I12b568ec6a30ccdbe012a0c65df91f66f40fc0fa --- includes/Initialize.php | 49 +++++++++++++++++++++++++++++++++++ includes/WebStart.php | 40 +++------------------------- maintenance/Maintenance.php | 5 ---- maintenance/doMaintenance.php | 20 +------------- 4 files changed, 53 insertions(+), 61 deletions(-) create mode 100644 includes/Initialize.php diff --git a/includes/Initialize.php b/includes/Initialize.php new file mode 100644 index 0000000000..4bc63f451d --- /dev/null +++ b/includes/Initialize.php @@ -0,0 +1,49 @@ +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 -- 2.20.1