jenkins-bot has submitted this change and it was merged.

Change subject: Replace the wiki set number on Special:GlobalGroupPermissions 
with a link
......................................................................


Replace the wiki set number on Special:GlobalGroupPermissions with a link

Or text if it has no wiki set.

Change-Id: Ia8523da29d1ef28e61de9314c1ed51faf5723845
---
M CentralAuth.i18n.php
M specials/SpecialGlobalGroupPermissions.php
2 files changed, 13 insertions(+), 2 deletions(-)

Approvals:
  Hoo man: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index e59668e..44f8661 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -337,6 +337,7 @@
        'centralauth-editgroup-success-text'              => 'You have 
successfully changed the group permissions for the $1 group.
 [[Special:GlobalGroupPermissions|Return to group management]]',
        'centralauth-editgroup-editsets'                  => 
'([[Special:EditWikiSets|edit]])',
+       'centralauth-editgroup-nowikiset'                 => 'None, applies to 
all wikis.',
        'centralauth-globalgrouppermissions-knownwiki'    => "Wiki on which 
they have an account:",
        'centralauth-globalgroupmembership-badknownwiki'  => "The global user 
'''$1''' is not active on the wiki you specified ('' $2 '').
 You may be attempting to assign rights to the wrong user!",
@@ -727,6 +728,7 @@
 * $1 - Name of the group',
        'centralauth-editgroup-noset' => '{{Identical|None}}',
        'centralauth-editgroup-reason' => '{{Identical|Reason}}',
+       'centralauth-editgroup-nowikiset' => 'Shown on 
Special:GlobalGroupPermissions for global groups which have no assigned 
WikiSet.',
        'centralauth-globalgrouppermissions-knownwiki' => 
'{{doc-singularthey}}',
        'centralauth-editset' => 'Se trata de grupos (o conjuntos) de wikis que 
pueden definirse, y adonde se pueden restringir grupos de usuarios. P. ej, los 
usuarios del grupo "global bot" sólo pueden editar en las wikis del grupo 
"global bot wikis". Definitivamente no son "ajustes" (!).',
        'centralauth-editset-legend-rw' => 'The legend of the fieldset. 
Displayed when the user can edit.',
diff --git a/specials/SpecialGlobalGroupPermissions.php 
b/specials/SpecialGlobalGroupPermissions.php
index 1b24193..94dac11 100644
--- a/specials/SpecialGlobalGroupPermissions.php
+++ b/specials/SpecialGlobalGroupPermissions.php
@@ -169,8 +169,17 @@
                $sets = WikiSet::getAllWikiSets();
                $default = WikiSet::getWikiSetForGroup( $group );
 
-               if ( !$this->userCanEdit( $this->getUser() ) )
-                       return htmlspecialchars( $default );
+               if ( !$this->userCanEdit( $this->getUser() ) ) {
+                       $set = WikiSet::newFromID( $default );
+                       if ( $set ) {
+                               return Linker::link(
+                                       SpecialPage::getTitleFor( 'WikiSets', 
$set->getName() ),
+                                       htmlspecialchars( $set->getName() )
+                               );
+                       } else {
+                               return $this->msg( 
'centralauth-editgroup-nowikiset' );
+                       }
+               }
 
                $select = new XmlSelect( 'set', 'wikiset', $default );
                $select->addOption( $this->msg( 'centralauth-editgroup-noset' 
)->text(), '0' );

-- 
To view, visit https://gerrit.wikimedia.org/r/52576
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8523da29d1ef28e61de9314c1ed51faf5723845
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to