Avoid using WikiPage::factory()

WikiPage::factory() is deprecated since 1.36 and should be replaced
with WikiPageFactory::newFromTitle().

Bug: T297688
Change-Id: Ic3f8745de45916baca68ab3620ca88148fbbc4ba
This commit is contained in:
Alexander Vorwerk 2021-12-14 12:32:13 +01:00
parent 2d3067e347
commit 49eaa3a463

View file

@ -135,7 +135,7 @@ class TitleBlacklist {
return '';
}
} else {
$page = WikiPage::factory( $title );
$page = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $title );
if ( $page->exists() ) {
$content = $page->getContent();
return ( $content instanceof TextContent ) ? $content->getText() : "";