mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-23 21:53:40 +00:00
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:
parent
2d3067e347
commit
49eaa3a463
|
@ -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() : "";
|
||||
|
|
Loading…
Reference in a new issue