Upgrade to use of new MediaWiki\Title for use in MW 1.44

This commit is contained in:
2025-07-09 22:27:34 +02:00
parent 90edd23e4f
commit 5a32049982
10 changed files with 30 additions and 26 deletions

View File

@@ -25,6 +25,7 @@
namespace LinkTitles;
use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title as MWTitle;
/**
* Represents a page that is a potential link target.
@@ -32,7 +33,7 @@ use MediaWiki\MediaWikiServices;
class Target {
/**
* A Title object for the target page currently being examined.
* @var \Title $title
* @var MediaWiki\Title\Title $title
*/
private $title;
@@ -76,7 +77,7 @@ class Target {
* @param String &$title Title of the target page
*/
public function __construct( $namespace, $title, Config &$config ) {
$this->title = \Title::makeTitleSafe( $namespace, $title );
$this->title = MWTitle::makeTitleSafe( $namespace, $title );
$this->titleValue = $this->title->getTitleValue();
$this->config = $config;
@@ -252,7 +253,7 @@ class Target {
/**
* Obtain a page's content.
* Workaround for MediaWiki 1.36+ which deprecated Wikipage::factory.
* @param \Title $title
* @param MediaWiki\Title\Title $title
* @return Content content object of the page
*/
private static function getPageContents( $title ) {