X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateCommonPasswordCdb.php;h=ef5a30de10b217c5c8c65619c7e03159e9c10457;hb=96bbe7cb4c8ab5ecd78cc65985633cec14a65839;hp=f7e0c0fb9f463fae800e05149848c5be478e0410;hpb=55043101b2a89ea1e811b6d35e415f57ed0bf41d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createCommonPasswordCdb.php b/maintenance/createCommonPasswordCdb.php index f7e0c0fb9f..ef5a30de10 100644 --- a/maintenance/createCommonPasswordCdb.php +++ b/maintenance/createCommonPasswordCdb.php @@ -60,12 +60,12 @@ class GenerateCommonPassword extends Maintenance { $outfile = $this->getArg( 1 ); if ( !is_readable( $infile ) && $infile !== 'php://stdin' ) { - $this->error( "Cannot open input file $infile for reading", 1 ); + $this->fatalError( "Cannot open input file $infile for reading" ); } $file = fopen( $infile, 'r' ); if ( $file === false ) { - $this->error( "Cannot read input file $infile", 1 ); + $this->fatalError( "Cannot read input file $infile" ); } try { @@ -109,10 +109,10 @@ class GenerateCommonPassword extends Maintenance { " (out of $i) passwords to $outfile\n" ); } catch ( \Cdb\Exception $e ) { - $this->error( "Error writing cdb file: " . $e->getMessage(), 2 ); + $this->fatalError( "Error writing cdb file: " . $e->getMessage(), 2 ); } } } -$maintClass = "GenerateCommonPassword"; +$maintClass = GenerateCommonPassword::class; require_once RUN_MAINTENANCE_IF_MAIN;