diff --git a/extension.json b/extension.json index a158071..d23825f 100644 --- a/extension.json +++ b/extension.json @@ -15,7 +15,7 @@ "license-name": "GPL-2.0+", "descriptionmsg": "linktitles-desc", "requires": { - "MediaWiki": ">= 1.28.0" + "MediaWiki": ">= 1.32.0" }, "config": { "LinkTitlesParseOnEdit": true, 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() ); } /**