X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexception%2FPermissionsError.php;h=cc69a762c1195ee1c1a56d845a8678a936cb633b;hb=d28eb17a50f95c169b46ae92f99d18c95ae30105;hp=e31374c2c7e470bfa6be63f71546f7e242667b50;hpb=4a585f9ce96947f0c17d99e6f5bc93bad8e12c14;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/PermissionsError.php b/includes/exception/PermissionsError.php index e31374c2c7..cc69a762c1 100644 --- a/includes/exception/PermissionsError.php +++ b/includes/exception/PermissionsError.php @@ -45,10 +45,10 @@ class PermissionsError extends ErrorPageError { $this->permission = $permission; if ( !count( $errors ) ) { - $groups = array_map( - [ 'User', 'makeGroupLinkWiki' ], - User::getGroupsWithPermission( $this->permission ) - ); + $groups = []; + foreach ( User::getGroupsWithPermission( $this->permission ) as $group ) { + $groups[] = UserGroupMembership::getLink( $group, RequestContext::getMain(), 'wiki' ); + } if ( $groups ) { $errors[] = [ 'badaccess-groups', $wgLang->commaList( $groups ), count( $groups ) ]; @@ -58,6 +58,9 @@ class PermissionsError extends ErrorPageError { } $this->errors = $errors; + + // Give the parent class something to work with + parent::__construct( 'permissionserrors', Message::newFromSpecifier( $errors[0] ) ); } public function report() {