X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FformatInstallDoc.php;h=3d34be147767db500561e1ef714b8e4afd1d3935;hb=f51c9e889f24091d3e20488530c1f80900059868;hp=e2b3c4199d726765a97641a0e09b570b2a290091;hpb=8734fe02b84c0fdd6fa53454b23ce9239b50dc75;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/formatInstallDoc.php b/maintenance/formatInstallDoc.php index e2b3c4199d..3d34be1477 100644 --- a/maintenance/formatInstallDoc.php +++ b/maintenance/formatInstallDoc.php @@ -28,7 +28,7 @@ require_once __DIR__ . '/Maintenance.php'; * * @ingroup Maintenance */ -class MaintenanceFormatInstallDoc extends Maintenance { +class FormatInstallDoc extends Maintenance { function __construct() { parent::__construct(); $this->addArg( 'path', 'The file name to format', false ); @@ -41,8 +41,7 @@ class MaintenanceFormatInstallDoc extends Maintenance { $fileName = $this->getArg( 0 ); $inFile = fopen( $fileName, 'r' ); if ( !$inFile ) { - $this->error( "Unable to open input file \"$fileName\"" ); - exit( 1 ); + $this->fatalError( "Unable to open input file \"$fileName\"" ); } } else { $inFile = STDIN; @@ -52,8 +51,7 @@ class MaintenanceFormatInstallDoc extends Maintenance { $fileName = $this->getOption( 'outfile' ); $outFile = fopen( $fileName, 'w' ); if ( !$outFile ) { - $this->error( "Unable to open output file \"$fileName\"" ); - exit( 1 ); + $this->fatalError( "Unable to open output file \"$fileName\"" ); } } else { $outFile = STDOUT; @@ -74,5 +72,5 @@ class MaintenanceFormatInstallDoc extends Maintenance { } } -$maintClass = 'MaintenanceFormatInstallDoc'; +$maintClass = FormatInstallDoc::class; require_once RUN_MAINTENANCE_IF_MAIN;