00001 <?php
00029 if ( !defined( 'DO_MAINTENANCE' ) ) {
00030 echo "This file must be included after Maintenance.php\n";
00031 exit( 1 );
00032 }
00033
00034 if( !$maintClass || !class_exists( $maintClass ) ) {
00035 echo "\$maintClass is not set or is set to a non-existent class.\n";
00036 exit( 1 );
00037 }
00038
00039 if( defined( 'MW_NO_SETUP' ) ) {
00040 return;
00041 }
00042
00043
00044 $maintenance = new $maintClass();
00045
00046
00047 $maintenance->setup();
00048
00049
00050
00051 $self = $maintenance->getName();
00052
00053 # Setup the profiler
00054 if ( file_exists( "$IP/StartProfiler.php" ) ) {
00055 require_once( "$IP/StartProfiler.php" );
00056 } else {
00057 require_once( "$IP/includes/ProfilerStub.php" );
00058 }
00059
00060
00061 require_once( "$IP/includes/AutoLoader.php" );
00062 require_once( "$IP/includes/Defines.php" );
00063
00064
00065
00066 if( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) {
00067 # TODO FIXME! Wikimedia-specific stuff needs to go away to an ext
00068 # Maybe a hook?
00069 global $cluster;
00070 $wgWikiFarm = true;
00071 $cluster = 'pmtpa';
00072 require_once( "$IP/includes/SiteConfiguration.php" );
00073 require( "$IP/wmf-config/wgConf.php" );
00074 $maintenance->loadWikimediaSettings();
00075 require( $IP.'/wmf-config/CommonSettings.php' );
00076 } else {
00077 require_once( $maintenance->loadSettings() );
00078 }
00079 if ( $maintenance->getDbType() === Maintenance::DB_ADMIN &&
00080 is_readable( "$IP/AdminSettings.php" ) )
00081 {
00082 require( "$IP/AdminSettings.php" );
00083 }
00084 $maintenance->finalSetup();
00085
00086 require_once( "$IP/includes/Setup.php" );
00087 require_once( "$IP/maintenance/install-utils.inc" );
00088
00089
00090 $wgTitle = null;
00091
00092
00093 try {
00094 $maintenance->execute();
00095
00096
00097 $maintenance->globals();
00098 } catch( MWException $mwe ) {
00099 echo( $mwe->getText() );
00100 exit( 1 );
00101 }
00102