From 2479f5c7f89896118c0629ce83e0f1cc0b9822b6 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 28 Oct 2019 20:10:07 +0000 Subject: [PATCH] Drop use of wgParser, replaced in 1.32 and to be removed in 1.35 Bug: T160811 Change-Id: Id7332a19d64d83bcbccfd3ac89464dfea593cdc2 --- .phpcs.xml | 1 - includes/ApiVisualEditor.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index 58bda6fe72..8dca4cccd1 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,7 +1,6 @@ - diff --git a/includes/ApiVisualEditor.php b/includes/ApiVisualEditor.php index 96aacc6bc4..d0ecdef2a0 100644 --- a/includes/ApiVisualEditor.php +++ b/includes/ApiVisualEditor.php @@ -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( '
{{:' . $eiTitle->getFullText() . '}}
', $title, new ParserOptions()