X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FinvalidateUserSessions.php;h=6e62cd1a91d20b97c419d5fe218079e8bc943a92;hb=5d743b03814d2e36abc45f0d9e048d6390b01084;hp=11e3372ce608396d01fa106134be1636b4e9fe1c;hpb=7160234ab2976d9ef7c36cb16f2101059388f2f2;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/invalidateUserSessions.php b/maintenance/invalidateUserSessions.php index 11e3372ce6..6e62cd1a91 100644 --- a/maintenance/invalidateUserSessions.php +++ b/maintenance/invalidateUserSessions.php @@ -49,9 +49,9 @@ class InvalidateUserSesssions extends Maintenance { $file = $this->getOption( 'file' ); if ( $username === null && $file === null ) { - $this->error( 'Either --user or --file is required', 1 ); + $this->fatalError( 'Either --user or --file is required' ); } elseif ( $username !== null && $file !== null ) { - $this->error( 'Cannot use both --user and --file', 1 ); + $this->fatalError( 'Cannot use both --user and --file' ); } if ( $username !== null ) { @@ -60,7 +60,7 @@ class InvalidateUserSesssions extends Maintenance { $usernames = is_readable( $file ) ? file( $file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES ) : false; if ( $usernames === false ) { - $this->error( "Could not open $file", 2 ); + $this->fatalError( "Could not open $file", 2 ); } } @@ -83,7 +83,7 @@ class InvalidateUserSesssions extends Maintenance { . str_replace( [ "\r", "\n" ], ' ', $e->getMessage() ) . "\n" ); } - if ( $i % $this->mBatchSize ) { + if ( $i % $this->getBatchSize() ) { $lbFactory->waitForReplication(); } }