X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FcompareParsers.php;h=2f0bcdf2a2ee225e7a6908b4a81174c7cc014b15;hb=ef8179300a76f93c2ed51c051d99408e3403513b;hp=f2540c7afa5609f2d5f3d802860889b866698b79;hpb=b67ab9de01a2eb95875d27a26eb9c30b22edf97e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index f2540c7afa..2f0bcdf2a2 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -95,9 +95,8 @@ class CompareParsers extends DumpIterator { $this->options = ParserOptions::newFromUser( $user ); if ( $this->hasOption( 'tidy' ) ) { - global $wgUseTidy; - if ( !$wgUseTidy ) { - $this->error( 'Tidy was requested but $wgUseTidy is not set in LocalSettings.php', true ); + if ( !MWTidy::isEnabled() ) { + $this->fatalError( 'Tidy was requested but $wgTidyConfig is not set in LocalSettings.php' ); } $this->options->setTidy( true ); } @@ -145,7 +144,7 @@ class CompareParsers extends DumpIterator { return; } - $text = strval( $content->getNativeData() ); + $text = strval( $content->getText() ); $output1 = $parser1->parse( $text, $title, $this->options ); $output2 = $parser2->parse( $text, $title, $this->options ); @@ -185,5 +184,5 @@ class CompareParsers extends DumpIterator { } } -$maintClass = "CompareParsers"; +$maintClass = CompareParsers::class; require_once RUN_MAINTENANCE_IF_MAIN;