mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-09-02 22:46:56 +02:00
Upgrade to use of new MediaWiki\Title for use in MW 1.44
This commit is contained in:
@@ -64,7 +64,7 @@ class Extension {
|
||||
// MW 1.36+
|
||||
if ( method_exists( MediaWikiServices::class, 'getWikiPageFactory' ) ) {
|
||||
$wikiPageFactory = MediaWikiServices::getInstance()->getWikiPageFactory();
|
||||
$wikiPage = $wikiPageFactory->newFromTitle( $title );
|
||||
$wikiPage = $wikiPageFactory->newFromLinkTarget( $title );
|
||||
} else {
|
||||
$wikiPage = WikiPage::factory( $title );
|
||||
}
|
||||
@@ -102,11 +102,11 @@ class Extension {
|
||||
*
|
||||
* Entry point for the SpecialLinkTitles class and the LinkTitlesJob class.
|
||||
*
|
||||
* @param \Title $title Title object.
|
||||
* @param MediaWiki\Title\Title $title Title object.
|
||||
* @param \RequestContext $context Current request context. If in doubt, call MediaWiki's `RequestContext::getMain()` to obtain such an object.
|
||||
* @return bool True if the page exists, false if the page does not exist
|
||||
*/
|
||||
public static function processPage( \Title $title, \RequestContext $context ) {
|
||||
public static function processPage( MediaWiki\Title\Title $title, \RequestContext $context ) {
|
||||
$config = new Config();
|
||||
$source = Source::createFromTitle( $title, $config );
|
||||
if ( $source->hasContent() ) {
|
||||
|
Reference in New Issue
Block a user