X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FsyncFileBackend.php;h=49627c3e5fe12bb66bddc6c2c59db0f4a1858a08;hp=154f54e53f548cca9d46069445ac2c0e5307bfee;hb=faf7cc4a09848c538320bd2b9067b1a77c0a0183;hpb=c8257fff63295f75755bb0624ceb9b600f692585 diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php index 154f54e53f..49627c3e5f 100644 --- a/maintenance/syncFileBackend.php +++ b/maintenance/syncFileBackend.php @@ -54,7 +54,7 @@ class SyncFileBackend extends Maintenance { if ( $this->hasOption( 'posdump' ) ) { // Just dump the current position into the specified position dir if ( !$this->hasOption( 'posdir' ) ) { - $this->error( "Param posdir required!", 1 ); + $this->fatalError( "Param posdir required!" ); } if ( $this->hasOption( 'postime' ) ) { $id = (int)$src->getJournal()->getPositionAtTime( $this->getOption( 'postime' ) ); @@ -76,7 +76,7 @@ class SyncFileBackend extends Maintenance { } if ( !$this->hasOption( 'dst' ) ) { - $this->error( "Param dst required!", 1 ); + $this->fatalError( "Param dst required!" ); } $dst = FileBackendGroup::singleton()->get( $this->getOption( 'dst' ) ); @@ -156,7 +156,7 @@ class SyncFileBackend extends Maintenance { $first = true; // first batch if ( $start > $end ) { // sanity - $this->error( "Error: given starting ID greater than ending ID.", 1 ); + $this->fatalError( "Error: given starting ID greater than ending ID." ); } $next = null; @@ -303,5 +303,5 @@ class SyncFileBackend extends Maintenance { } } -$maintClass = "SyncFileBackend"; +$maintClass = SyncFileBackend::class; require_once RUN_MAINTENANCE_IF_MAIN;