}
if( !$maintClass || !class_exists( $maintClass ) ) {
- echo "\$maintClass is not set or is set to a non-existent class.";
+ echo "\$maintClass is not set or is set to a non-existent class.\n";
exit( 1 );
}
require_once( "$IP/includes/ProfilerStub.php" );
}
+// Some other requires
+require_once( "$IP/includes/AutoLoader.php" );
+require_once( "$IP/includes/Defines.php" );
+
// Load settings, using wikimedia-mode if needed
// Fixme: replace this hack with general farm-friendly code
if( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) {
global $cluster;
$wgWikiFarm = true;
$cluster = 'pmtpa';
- require_once( "$IP/includes/AutoLoader.php" );
require_once( "$IP/includes/SiteConfiguration.php" );
require( "$IP/wmf-config/wgConf.php" );
$maintenance->loadWikimediaSettings();
- require( $IP.'/includes/Defines.php' );
require( $IP.'/wmf-config/CommonSettings.php' );
} else {
- require_once( "$IP/includes/AutoLoader.php" );
- require_once( "$IP/includes/Defines.php" );
require_once( $maintenance->loadSettings() );
}
$maintenance->finalSetup();
// Do the work
try {
$maintenance->execute();
+
+ // Potentially debug globals
+ $maintenance->globals();
} catch( MWException $mwe ) {
echo( $mwe->getText() );
+ exit( 1 );
}
-// Potentially debug globals
-$maintenance->globals();