* @since 1.27
* @ingroup Maintenance
*/
-class GenerateCommonPassword extends Maintenance {
+class CreateCommonPasswordCdb extends Maintenance {
public function __construct() {
global $IP;
parent::__construct();
$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 {
" (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;