mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-27 16:10:15 +00:00
Use WikiPageFactory to create WikiPage object
Bug: T259948 Change-Id: I7bacc0d3554e5591f826095fad8314a20c31107e
This commit is contained in:
parent
570ee448fe
commit
551b610abf
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue