}
function getDbType() {
- /* If we used the class constant PHP4 would give a parser error here */
- return 2; /* Maintenance::DB_ADMIN */
+ return Maintenance::DB_ADMIN;
}
function compatChecks() {
$this->output( "MediaWiki {$wgVersion} Updater\n\n" );
- wfWaitForSlaves( 5 ); // let's not kill databases, shall we? ;) --tor
+ wfWaitForSlaves();
if ( !$this->hasOption( 'skip-compat-checks' ) ) {
$this->compatChecks();
wfCountDown( 5 );
}
- $time1 = new MWTimestamp();
+ $time1 = microtime( true );
$shared = $this->hasOption( 'doshared' );
$updater->purgeCache();
}
- $time2 = new MWTimestamp();
- $timeDiff = $time2->diff( $time1 );
- $this->output( "\nDone in " . $timeDiff->format( "%i:%S" ) . ".\n" );
+ $time2 = microtime( true );
+
+ $timeDiff = $wgLang->formatTimePeriod( $time2 - $time1 );
+ $this->output( "\nDone in $timeDiff.\n" );
}
function afterFinalSetup() {