Replace uses of old deprecated SpecialPageFactory

Extension requires 1.32+, so version isn't an issue

Bug: T246142
Change-Id: I5642d3781af5b366389f3fc4fc359989f6f9dbd8
This commit is contained in:
DannyS712 2020-02-28 23:43:44 +00:00
parent c681e92498
commit 66853b88db

View file

@ -20,6 +20,8 @@
* @file
*/
use MediaWiki\MediaWikiServices;
class ReplaceTextHooks {
/**
@ -58,7 +60,8 @@ class ReplaceTextHooks {
*/
public static function replaceTextReminder( &$form, &$ot, &$nt ) {
$out = $form->getOutput();
$page = SpecialPageFactory::getPage( 'ReplaceText' );
$page = MediaWikiServices::getInstance()->getSpecialPageFactory()
->getPage( 'ReplaceText' );
$pageLink = ReplaceTextUtils::link( $page->getPageTitle() );
$out->addHTML( $form->msg( 'replacetext_reminder' )
->rawParams( $pageLink )->inContentLanguage()->parseAsBlock() );