$this->output( "Going to run database updates for " . wfWikiID() . "\n" );
if ( $db->getType() === 'sqlite' ) {
- $this->output( "Using SQLite file: '{$db->mDatabaseFile}'\n" );
+ $this->output( "Using SQLite file: '{$db->getDbFilePath()}'\n" );
}
$this->output( "Depending on the size of your database this may take a while!\n" );
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() {