X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialListgrouprights.php;h=2ca4190a76cb8ac6794d78507b494a2b9569745e;hp=7a25e55d58352c50595c1fc9825c010aa9bbce42;hb=40c690d3a6a3f31d40c1eaf2c5143d4543b5d11f;hpb=8bb5a6c461c31ee5ce6874548246fc2c520686f6 diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index 7a25e55d58..2ca4190a76 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -29,7 +29,7 @@ * @author Petr Kadlec */ class SpecialListGroupRights extends SpecialPage { - function __construct() { + public function __construct() { parent::__construct( 'Listgrouprights' ); } @@ -81,14 +81,10 @@ class SpecialListGroupRights extends SpecialPage { ? 'all' : $group; - $msg = $this->msg( 'group-' . $groupname ); - $groupnameLocalized = !$msg->isBlank() ? $msg->text() : $groupname; + $groupnameLocalized = UserGroupMembership::getGroupName( $groupname ); - $msg = $this->msg( 'grouppage-' . $groupname )->inContentLanguage(); - $grouppageLocalized = !$msg->isBlank() ? - $msg->text() : - MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname; - $grouppageLocalizedTitle = Title::newFromText( $grouppageLocalized ); + $grouppageLocalizedTitle = UserGroupMembership::getGroupPage( $groupname ) + ?: Title::newFromText( MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname ); if ( $group == '*' || !$grouppageLocalizedTitle ) { // Do not make a link for the generic * group or group with invalid group page @@ -126,7 +122,7 @@ class SpecialListGroupRights extends SpecialPage { ? $groupsRemoveFromSelf[$group] : []; - $id = $group == '*' ? false : Sanitizer::escapeId( $group ); + $id = $group == '*' ? false : Sanitizer::escapeIdForAttribute( $group ); $out->addHTML( Html::rawElement( 'tr', [ 'id' => $id ], " $grouppage$grouplink " . @@ -231,7 +227,7 @@ class SpecialListGroupRights extends SpecialPage { * @param array $remove Array of groups this group is allowed to remove or true * @param array $addSelf Array of groups this group is allowed to add to self or true * @param array $removeSelf Array of group this group is allowed to remove from self or true - * @return string List of all granted permissions, separated by comma separator + * @return string HTML list of all granted permissions */ private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) { $r = [];