From ab97174283c73af6f6dff348361bd920a0292fab Mon Sep 17 00:00:00 2001 From: paladox Date: Sat, 31 Oct 2020 00:00:11 +0000 Subject: [PATCH] Fix MediaWiki 1.35 support --- includes/Source.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Source.php b/includes/Source.php index b751004..c7a1b25 100644 --- a/includes/Source.php +++ b/includes/Source.php @@ -23,6 +23,8 @@ */ namespace LinkTitles; +use MediaWiki\MediaWikiServices; + /** * Represents a page that is a potential link target. */ @@ -149,7 +151,7 @@ class Source { * @return boolean True if the page contains the __NOAUTOLINKS__ magic word. */ public function hasNoAutolinksMagicWord() { - return \MagicWord::get( 'MAG_LINKTITLES_NOAUTOLINKS' )->match( $this->getText() ); + return MediaWikiServices::getInstance()->getMagicWordFactory()->get( 'MAG_LINKTITLES_NOAUTOLINKS' )->match( $this->getText() ); } /**