mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Drop use of wgParser, replaced in 1.32 and to be removed in 1.35
Bug: T160811 Change-Id: Id7332a19d64d83bcbccfd3ac89464dfea593cdc2
This commit is contained in:
parent
a5eb16f681
commit
2479f5c7f8
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset>
|
||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgParser" />
|
||||
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
|
||||
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
|
||||
</rule>
|
||||
|
|
|
@ -407,8 +407,7 @@ class ApiVisualEditor extends ApiBase {
|
|||
if ( $params['editintro'] ) {
|
||||
$eiTitle = Title::newFromText( $params['editintro'] );
|
||||
if ( $eiTitle instanceof Title && $eiTitle->exists() && $eiTitle->userCan( 'read' ) ) {
|
||||
global $wgParser;
|
||||
$notices[] = $wgParser->parse(
|
||||
$notices[] = MediaWikiServices::getInstance()->getParser()->parse(
|
||||
'<div class="mw-editintro">{{:' . $eiTitle->getFullText() . '}}</div>',
|
||||
$title,
|
||||
new ParserOptions()
|
||||
|
|
Loading…
Reference in a new issue