From 0f32a506a08f73467cf332892a4504f5e0edd36e Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 17 Oct 2018 13:08:39 -0400 Subject: [PATCH] Replace deprecated untidy OutputPage::addWikiText() method The replacement OutputPage::addWikiTextAsInterface() method was added in MW 1.32; the minimum required MW version has been bumped accordingly. Bug: T198214 Change-Id: Ie9932b7398d0a9184094a99aec060d78f62dd6f0 --- README | 2 +- extension.json | 3 +++ src/SpecialMathStatus.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README b/README index a7ac064..f4367ab 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This version (for MediaWiki 1.31) has some changes since previous versions: +The version for MediaWiki 1.31+ has some changes since previous versions: By default the math rendering service from the Wikimedia Foundation located at https://wikimedia.org/api/rest_v1/ diff --git a/extension.json b/extension.json index eb05f62..2177322 100644 --- a/extension.json +++ b/extension.json @@ -12,6 +12,9 @@ "license-name": "GPL-2.0-or-later", "callback": "MathHooks::registerExtension", "type": "parserhook", + "requires": { + "MediaWiki": ">= 1.32.0" + }, "AutoloadClasses": { "MathMathSymbolsDataModule": "src/MathMathSymbolsDataModule.php", "MathChemSymbolsDataModule": "src/MathChemSymbolsDataModule.php", diff --git a/src/SpecialMathStatus.php b/src/SpecialMathStatus.php index 9e25701..16808f0 100644 --- a/src/SpecialMathStatus.php +++ b/src/SpecialMathStatus.php @@ -35,7 +35,7 @@ class SpecialMathStatus extends SpecialPage { $out->addWikiMsg( 'math-status-introduction', count( $enabledMathModes ) ); foreach ( $enabledMathModes as $modeNr => $modeName ) { - $out->addWikiText( "=== $modeName ===" ); + $out->addWikiTextAsInterface( "=== $modeName ===" ); switch ( $modeNr ) { case 'mathml': $this->runMathMLTest( $modeName );