3 * We want to make this whole thing as seamless as possible to the
4 * end-user. Unfortunately, we can't do _all_ of the work in the class
5 * because A) included files are not in global scope, but in the scope
6 * of their caller, and B) MediaWiki has way too many globals. So instead
7 * we'll kinda fake it, and do the requires() inline. <3 PHP
10 if( !isset( $maintClass ) ||
!class_exists( $maintClass ) ) {
11 echo "\$maintClass is not set or is set to a non-existent class.";
15 if( defined( 'MW_NO_SETUP' ) ) {
19 // Get an object to start us off
20 $maintenance = new $maintClass();
22 // Basic sanity checks and such
23 $maintenance->setup();
26 if ( file_exists( "$IP/StartProfiler.php" ) ) {
27 require_once( "$IP/StartProfiler.php" );
29 require_once( "$IP/includes/ProfilerStub.php" );
32 // Load settings, using wikimedia-mode if needed
33 if( file_exists( dirname(__FILE__
).'/wikimedia-mode' ) ) {
34 # TODO FIXME! Wikimedia-specific stuff needs to go away to an ext
39 require_once( "$IP/includes/AutoLoader.php" );
40 require_once( "$IP/includes/SiteConfiguration.php" );
41 require( "$IP/wgConf.php" );
42 $maintenance->loadWikimediaSettings();
43 require( $IP.'/includes/Defines.php' );
44 require( $IP.'/CommonSettings.php' );
46 require_once( "$IP/includes/AutoLoader.php" );
47 require_once( "$IP/includes/Defines.php" );
48 require_once( $maintenance->loadSettings() );
51 require_once( "$IP/includes/Setup.php" );
52 require_once( "$IP/install-utils.inc" );
54 $wgTitle = null; # Much much faster startup than creating a title object
57 $maintenance->execute();
58 } catch( MWException
$mwe ) {
59 echo( $mwe->getText() );