mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +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"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||||
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgParser" />
|
|
||||||
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
|
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
|
||||||
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
|
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
|
||||||
</rule>
|
</rule>
|
||||||
|
|
|
@ -407,8 +407,7 @@ class ApiVisualEditor extends ApiBase {
|
||||||
if ( $params['editintro'] ) {
|
if ( $params['editintro'] ) {
|
||||||
$eiTitle = Title::newFromText( $params['editintro'] );
|
$eiTitle = Title::newFromText( $params['editintro'] );
|
||||||
if ( $eiTitle instanceof Title && $eiTitle->exists() && $eiTitle->userCan( 'read' ) ) {
|
if ( $eiTitle instanceof Title && $eiTitle->exists() && $eiTitle->userCan( 'read' ) ) {
|
||||||
global $wgParser;
|
$notices[] = MediaWikiServices::getInstance()->getParser()->parse(
|
||||||
$notices[] = $wgParser->parse(
|
|
||||||
'<div class="mw-editintro">{{:' . $eiTitle->getFullText() . '}}</div>',
|
'<div class="mw-editintro">{{:' . $eiTitle->getFullText() . '}}</div>',
|
||||||
$title,
|
$title,
|
||||||
new ParserOptions()
|
new ParserOptions()
|
||||||
|
|
Loading…
Reference in a new issue