dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split some Language methods to LanguageNameUtils
[lhc/web/wiklou.git]
/
maintenance
/
compareParsers.php
diff --git
a/maintenance/compareParsers.php
b/maintenance/compareParsers.php
index
f2540c7
..
0d4b7b1
100644
(file)
--- a/
maintenance/compareParsers.php
+++ b/
maintenance/compareParsers.php
@@
-39,6
+39,18
@@
require_once __DIR__ . '/dumpIterator.php';
class CompareParsers extends DumpIterator {
private $count = 0;
class CompareParsers extends DumpIterator {
private $count = 0;
+ /** @var bool */
+ private $saveFailed;
+ /** @var bool */
+ private $stripParametersEnabled;
+ /** @var bool */
+ private $showParsedOutput;
+ /** @var bool */
+ private $showDiff;
+ /** @var ParserOptions */
+ private $options;
+ /** @var int */
+ private $failed;
public function __construct() {
parent::__construct();
public function __construct() {
parent::__construct();
@@
-95,9
+107,8
@@
class CompareParsers extends DumpIterator {
$this->options = ParserOptions::newFromUser( $user );
if ( $this->hasOption( 'tidy' ) ) {
$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 );
}
}
$this->options->setTidy( true );
}
@@
-145,7
+156,9
@@
class CompareParsers extends DumpIterator {
return;
}
return;
}
- $text = strval( $content->getNativeData() );
+ /** @var WikitextContent $content */
+ '@phan-var WikitextContent $content';
+ $text = strval( $content->getText() );
$output1 = $parser1->parse( $text, $title, $this->options );
$output2 = $parser2->parse( $text, $title, $this->options );
$output1 = $parser1->parse( $text, $title, $this->options );
$output2 = $parser2->parse( $text, $title, $this->options );
@@
-185,5
+198,5
@@
class CompareParsers extends DumpIterator {
}
}
}
}
-$maintClass =
"CompareParsers"
;
+$maintClass =
CompareParsers::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;