[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Replace Linker::link() with LinkRenderer in special pages
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 ) ) . ''; + $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
[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Replace Linker::link() with LinkRenderer in special pages
Matěj Suchánek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/336009 ) Change subject: Replace Linker::link() with LinkRenderer in special pages .. Replace Linker::link() with LinkRenderer in special pages 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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/09/336009/2 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 ) ) . ''; + $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