X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateCommonPasswordCdb.php;h=de611ec7de1cfe78c15369968ff4d23cea7a85a8;hb=6fdfad6ddd484e2ed2a3386e84f26d5236aafbe7;hp=f7e0c0fb9f463fae800e05149848c5be478e0410;hpb=10d1b7d12b5d097413cd507740c5c71781c2580b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createCommonPasswordCdb.php b/maintenance/createCommonPasswordCdb.php index f7e0c0fb9f..de611ec7de 100644 --- a/maintenance/createCommonPasswordCdb.php +++ b/maintenance/createCommonPasswordCdb.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php'; * @since 1.27 * @ingroup Maintenance */ -class GenerateCommonPassword extends Maintenance { +class CreateCommonPasswordCdb extends Maintenance { public function __construct() { global $IP; parent::__construct(); @@ -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 = CreateCommonPasswordCdb::class; require_once RUN_MAINTENANCE_IF_MAIN;