From: withoutaname Date: Sun, 24 Aug 2014 21:26:14 +0000 (-0700) Subject: Consolidate parts of WebStart.php and doMaintenance.php into Initialize.php X-Git-Tag: 1.31.0-rc.0~14240^2~1 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=214931ed33124a36e01e105c41c7d7e4797bde82;p=lhc%2Fweb%2Fwiklou.git 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 --- 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