$wgParser is deprecated and using globals should also be avoid. So, replacing
the use of global $wgParser by a mediawiki service.
Change-Id: I34b61338e500567773249c71da0a7125cfd50d02
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
$outText = InstallDocFormatter::format( $inText );
if ( $this->hasOption( 'html' ) ) {
$outText = InstallDocFormatter::format( $inText );
if ( $this->hasOption( 'html' ) ) {
+ $parser = MediaWikiServices::getInstance()->getParser();
$opt = new ParserOptions;
$title = Title::newFromText( 'Text file' );
$opt = new ParserOptions;
$title = Title::newFromText( 'Text file' );
- $out = $wgParser->parse( $outText, $title, $opt );
+ $out = $parser->parse( $outText, $title, $opt );
$outText = "<html><body>\n" . $out->getText() . "\n</body></html>\n";
}
$outText = "<html><body>\n" . $out->getText() . "\n</body></html>\n";
}
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/dumpIterator.php';
/**
require_once __DIR__ . '/dumpIterator.php';
/**
public $mPPNodeCount = 0;
public function getStripList() {
public $mPPNodeCount = 0;
public function getStripList() {
+ $parser = MediaWikiServices::getInstance()->getParser();
- return $wgParser->getStripList();
+ return $parser->getStripList();
}
public function __construct() {
}
public function __construct() {