jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/336009 )
Change subject: Replace Linker::link() with LinkRenderer in special pages
......................................................................
Replace Linker::link() with LinkRenderer in special pages
This fits current MediaWiki version requirement.
Bug: T149346
Change-Id: I386970ca6cb233a3a2aa412e371ed7a4bec4f7c0
---
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalUserMerge.php
M includes/specials/SpecialMultiLock.php
M includes/specials/SpecialWikiSets.php
6 files changed, 19 insertions(+), 17 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialCentralAuth.php
b/includes/specials/SpecialCentralAuth.php
index c0cc484..2b72f15 100644
--- a/includes/specials/SpecialCentralAuth.php
+++ b/includes/specials/SpecialCentralAuth.php
@@ -344,9 +344,9 @@
$groups = $globalUser->getGlobalGroups();
if ( $groups ) {
$groups = array_map( function ( $group ) {
- return Linker::link(
+ return $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor(
'GlobalGroupPermissions', $group ),
- htmlspecialchars( User::getGroupName(
$group ) )
+ User::getGroupName( $group )
);
}, $groups );
$attribs['groups'] = $this->getLanguage()->commaList(
$groups );
diff --git a/includes/specials/SpecialGlobalGroupPermissions.php
b/includes/specials/SpecialGlobalGroupPermissions.php
index 48494a6..8d1f9fc 100644
--- a/includes/specials/SpecialGlobalGroupPermissions.php
+++ b/includes/specials/SpecialGlobalGroupPermissions.php
@@ -132,14 +132,15 @@
$table .= Html::openElement( 'td' );
$table .= $this->getOutput()->parseInline(
User::makeGroupLinkWiki( $groupName ) ) . '<br />';
+ $linkRenderer = $this->getLinkRenderer();
$links = array(
- Linker::linkKnown(
+ $linkRenderer->makeKnownLink(
$this->getPageTitle( $groupName ),
- $this->msg(
'centralauth-globalgroupperms-management' )->escaped()
+ $this->msg(
'centralauth-globalgroupperms-management' )->text()
),
- Linker::linkKnown(
+ $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor(
'GlobalUsers', $groupName ),
- $this->msg(
'centralauth-globalgroupperms-group-listmembers' )->escaped()
+ $this->msg(
'centralauth-globalgroupperms-group-listmembers' )->text()
),
);
$table .= $this->msg( 'parentheses' )->rawParams(
$this->getLanguage()->pipeList( $links ) )->escaped();
@@ -157,9 +158,9 @@
} else {
$table .= $this->msg(
'centralauth-globalgroupperms-group-wikiset' )
->rawParams(
- Linker::linkKnown(
+ $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'WikiSets', $wikiset['id'] ),
- htmlspecialchars(
$wikiset['name'] )
+ $wikiset['name']
)
)->escaped();
}
@@ -278,9 +279,9 @@
if ( !$this->userCanEdit( $this->getUser() ) ) {
$set = WikiSet::newFromID( $default );
if ( $set ) {
- return Linker::link(
+ return $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor( 'WikiSets',
$set->getId() ),
- htmlspecialchars( $set->getName() )
+ $set->getName()
);
} else {
return $this->msg(
'centralauth-editgroup-nowikiset' )->parse();
diff --git a/includes/specials/SpecialGlobalRenameQueue.php
b/includes/specials/SpecialGlobalRenameQueue.php
index 6eceebd..06247c6 100644
--- a/includes/specials/SpecialGlobalRenameQueue.php
+++ b/includes/specials/SpecialGlobalRenameQueue.php
@@ -829,7 +829,7 @@
case 'rq_name':
case 'rq_newname':
$title = SpecialPage::getTitleFor(
'CentralAuth' , $value );
- $formatted = Linker::link( $title,
htmlspecialchars( $value ) );
+ $formatted =
$this->getLinkRenderer()->makeLink( $title, $value );
break;
case 'rq_performer':
$steward = CentralAuthUser::newFromId( $value );
diff --git a/includes/specials/SpecialGlobalUserMerge.php
b/includes/specials/SpecialGlobalUserMerge.php
index c07f7a4..0e15873 100644
--- a/includes/specials/SpecialGlobalUserMerge.php
+++ b/includes/specials/SpecialGlobalUserMerge.php
@@ -191,9 +191,9 @@
* @return string raw HTML
*/
public function getLocalizedCentralAuthLink( $name ) {
- return Linker::linkKnown(
+ return $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'CentralAuth', $name ),
- htmlspecialchars( $name )
+ $name
);
}
diff --git a/includes/specials/SpecialMultiLock.php
b/includes/specials/SpecialMultiLock.php
index 2f66ea2..f67d915 100644
--- a/includes/specials/SpecialMultiLock.php
+++ b/includes/specials/SpecialMultiLock.php
@@ -325,10 +325,10 @@
$sca->setContext( $this->getContext() );
$guName = $globalUser->getName();
- $guLink = Linker::link(
+ $guLink = $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor( 'CentralAuth', $guName ),
// Names are known to exist, so this is not really
needed
- htmlspecialchars( $guName )
+ $guName
);
$guHidden = $sca->formatHiddenLevel(
$globalUser->getHiddenLevel() );
$accountAge = time() - wfTimestamp( TS_UNIX,
$globalUser->getRegistration() );
diff --git a/includes/specials/SpecialWikiSets.php
b/includes/specials/SpecialWikiSets.php
index 59d0acf..f1e124c 100644
--- a/includes/specials/SpecialWikiSets.php
+++ b/includes/specials/SpecialWikiSets.php
@@ -95,7 +95,7 @@
if ( $this->mCanEdit ) {
$target = SpecialPage::getTitleFor( 'WikiSets', '0' );
- $newlink = Linker::link( $target, $this->msg(
'centralauth-editset-new' )->escaped() );
+ $newlink = $this->getLinkRenderer()->makeLink( $target,
$this->msg( 'centralauth-editset-new' )->text() );
$this->getOutput()->addHTML( "<li>{$newlink}</li>" );
}
@@ -366,7 +366,8 @@
}
}
- $returnLink = Linker::linkKnown( $this->getPageTitle(),
$this->msg( 'centralauth-editset-return' )->escaped() );
+ $returnLink = $this->getLinkRenderer()->makeKnownLink(
+ $this->getPageTitle(), $this->msg(
'centralauth-editset-return' )->text() );
$this->getOutput()->addHTML( '<strong class="success">' .
$this->msg( 'centralauth-editset-success' )->escaped() . '</strong> <p>' .
$returnLink . '</p>' );
}
--
To view, visit https://gerrit.wikimedia.org/r/336009
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I386970ca6cb233a3a2aa412e371ed7a4bec4f7c0
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits