X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FsyncFileBackend.php;h=68afde70eed3e38dd25c9e3c4ccd3ce79c8a6b5f;hp=82149a6dddd2e0ebe2a3b91c31fbae4d600bf8df;hb=86d7bd86fa08db2dbf3651a656d8238a34703c4f;hpb=adae996840b9e782f6e14b21c433a83e37c3a74e diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php index 82149a6ddd..68afde70ee 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,12 +156,12 @@ 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; do { - $limit = min( $this->mBatchSize, $end - $start + 1 ); // don't go pass ending ID + $limit = min( $this->getBatchSize(), $end - $start + 1 ); // don't go pass ending ID $this->output( "Doing id $start to " . ( $start + $limit - 1 ) . "...\n" ); $entries = $src->getJournal()->getChangeEntries( $start, $limit, $next );