X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcompareParsers.php;h=fe6e604d96104744a8db3fb31a815de6a6943e15;hb=b33148f7d6b0b59c062c423943e841840e6620ed;hp=e67c439baf8a45f3c6fe87aab31082e9562248c1;hpb=13e33c28983461d5b8bdc1dece0cd0a35347a261;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index e67c439baf..fe6e604d96 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -43,7 +43,7 @@ class CompareParsers extends DumpIterator { public function __construct() { parent::__construct(); $this->saveFailed = false; - $this->mDescription = "Run a file or dump with several parsers"; + $this->addDescription( 'Run a file or dump with several parsers' ); $this->addOption( 'parser1', 'The first parser to compare.', true, true ); $this->addOption( 'parser2', 'The second parser to compare.', true, true ); $this->addOption( 'tidy', 'Run tidy on the articles.', false, false ); @@ -97,7 +97,7 @@ class CompareParsers extends DumpIterator { if ( $this->hasOption( 'tidy' ) ) { global $wgUseTidy; if ( !$wgUseTidy ) { - $this->error( 'Tidy was requested but $wgUseTidy is not set in LocalSettings.php', true ); + $this->fatalError( 'Tidy was requested but $wgUseTidy is not set in LocalSettings.php' ); } $this->options->setTidy( true ); } @@ -185,5 +185,5 @@ class CompareParsers extends DumpIterator { } } -$maintClass = "CompareParsers"; +$maintClass = CompareParsers::class; require_once RUN_MAINTENANCE_IF_MAIN;