mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-09-01 05:56:56 +02:00
more fixes
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
namespace LinkTitles;
|
namespace LinkTitles;
|
||||||
|
|
||||||
use MediaWiki\Title\Title;
|
use MediaWiki\Title\Title as MWTitle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches potential target page titles from the database.
|
* Fetches potential target page titles from the database.
|
||||||
@@ -43,7 +43,7 @@ class Targets {
|
|||||||
* @param String $sourceNamespace The namespace of the current page.
|
* @param String $sourceNamespace The namespace of the current page.
|
||||||
* @param Config $config LinkTitles configuration.
|
* @param Config $config LinkTitles configuration.
|
||||||
*/
|
*/
|
||||||
public static function singleton( Title $title, Config $config ) {
|
public static function singleton( MWTitle $title, Config $config ) {
|
||||||
if ( ( self::$instance === null ) || ( self::$instance->sourceNamespace != $title->getNamespace() ) ) {
|
if ( ( self::$instance === null ) || ( self::$instance->sourceNamespace != $title->getNamespace() ) ) {
|
||||||
self::$instance = new Targets( $title, $config );
|
self::$instance = new Targets( $title, $config );
|
||||||
}
|
}
|
||||||
@@ -85,9 +85,9 @@ class Targets {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor is private to enforce using the singleton pattern.
|
* The constructor is private to enforce using the singleton pattern.
|
||||||
* @param Title $title
|
* @param MWTitle $title
|
||||||
*/
|
*/
|
||||||
private function __construct( Title $title, Config $config) {
|
private function __construct( MWTitle $title, Config $config) {
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->sourceNamespace = $title->getNamespace();
|
$this->sourceNamespace = $title->getNamespace();
|
||||||
$this->fetch();
|
$this->fetch();
|
||||||
|
Reference in New Issue
Block a user