Fix MediaWiki 1.35 support

This commit is contained in:
paladox
2020-10-31 00:00:11 +00:00
committed by Daniel Kraus
parent fae0cf4f27
commit ab97174283

View File

@ -23,6 +23,8 @@
*/ */
namespace LinkTitles; namespace LinkTitles;
use MediaWiki\MediaWikiServices;
/** /**
* Represents a page that is a potential link target. * 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. * @return boolean True if the page contains the __NOAUTOLINKS__ magic word.
*/ */
public function hasNoAutolinksMagicWord() { public function hasNoAutolinksMagicWord() {
return \MagicWord::get( 'MAG_LINKTITLES_NOAUTOLINKS' )->match( $this->getText() ); return MediaWikiServices::getInstance()->getMagicWordFactory()->get( 'MAG_LINKTITLES_NOAUTOLINKS' )->match( $this->getText() );
} }
/** /**