class FixTimestamps extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "";
+ $this->addDescription( '' );
$this->addArg( 'offset', '' );
$this->addArg( 'start', 'Starting timestamp' );
$this->addArg( 'end', 'Ending timestamp' );
$row = $dbw->fetchObject( $res );
if ( is_null( $row->minrev ) ) {
- $this->error( "No revisions in search period.", true );
+ $this->fatalError( "No revisions in search period." );
}
$minRev = $row->minrev;
$res = $dbw->query( $sql, __METHOD__ );
$lastNormal = 0;
- $badRevs = array();
+ $badRevs = [];
$numGoodRevs = 0;
foreach ( $res as $row ) {
$numBadRevs = count( $badRevs );
if ( $numBadRevs > $numGoodRevs ) {
- $this->error(
+ $this->fatalError(
"The majority of revisions in the search interval are marked as bad.
Are you sure the offset ($offset) has the right sign? Positive means the clock
was incorrectly set forward, negative means the clock was incorrectly set back.
If the offset is right, then increase the search interval until there are enough
- good revisions to provide a majority reference.", true );
+ good revisions to provide a majority reference." );
} elseif ( $numBadRevs == 0 ) {
$this->output( "No bad revisions found.\n" );
exit( 0 );