diff --git a/includes/Source.php b/includes/Source.php index b751004..95df48e 100644 --- a/includes/Source.php +++ b/includes/Source.php @@ -149,7 +149,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 \MediaWiki\MediaWikiServices::getInstance()->getMagicWordFactory()->get( 'MAG_LINKTITLES_NOAUTOLINKS' )->match( $this->getText() ); } /** diff --git a/includes/Target.php b/includes/Target.php index 64d7d12..9ccd603 100644 --- a/includes/Target.php +++ b/includes/Target.php @@ -210,7 +210,7 @@ class Target { // page does indeed contain this magic word, return the page title // as-is (unlinked). if ( $this->config->enableNoTargetMagicWord ) { - if ( $this->getContent()->matchMagicWord( \MagicWord::get('MAG_LINKTITLES_NOTARGET') ) ) { + if ( $this->getContent()->matchMagicWord( \MediaWiki\MediaWikiServices::getInstance()->getMagicWordFactory()->get('MAG_LINKTITLES_NOTARGET') ) ) { return false; } };