Avoid SpecialPage::getTitleValueFor in LinkRenderer
The static function is using the global SpecialPageFactory Change-Id: I378d7dcf92b6e38f712de1138673bc77e2934f51
This commit is contained in:
parent
004012c004
commit
9f91ff1e01
1 changed files with 6 additions and 2 deletions
|
|
@ -28,9 +28,9 @@ use MediaWiki\HookContainer\HookRunner;
|
|||
use MediaWiki\SpecialPage\SpecialPageFactory;
|
||||
use NamespaceInfo;
|
||||
use Sanitizer;
|
||||
use SpecialPage;
|
||||
use Title;
|
||||
use TitleFormatter;
|
||||
use TitleValue;
|
||||
|
||||
/**
|
||||
* Class that generates HTML <a> links for pages.
|
||||
|
|
@ -360,7 +360,11 @@ class LinkRenderer {
|
|||
$target->getDBkey()
|
||||
);
|
||||
if ( $name ) {
|
||||
return SpecialPage::getTitleValueFor( $name, $subpage, $target->getFragment() );
|
||||
return new TitleValue(
|
||||
NS_SPECIAL,
|
||||
$this->specialPageFactory->getLocalNameFor( $name, $subpage ),
|
||||
$target->getFragment()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue