Use WikiPageFactory to create WikiPage object

Bug: T259948
Change-Id: I7bacc0d3554e5591f826095fad8314a20c31107e
This commit is contained in:
Umherirrender 2022-06-26 19:36:05 +02:00
parent 570ee448fe
commit 551b610abf

View file

@ -111,8 +111,13 @@ class Job extends JobParent {
}
}
} else {
if ( method_exists( MediaWikiServices::class, 'getWikiPageFactory' ) ) {
// MW 1.36+
$wikiPage = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $this->title );
} else {
$wikiPage = new WikiPage( $this->title );
}
$latestRevision = $wikiPage->getRevisionRecord();
if ( $latestRevision === null ) {