X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fexception%2FPermissionsError.php;h=cc69a762c1195ee1c1a56d845a8678a936cb633b;hp=e31374c2c7e470bfa6be63f71546f7e242667b50;hb=c584722cc2e3d33edae58d46c2149063b3fc6d72;hpb=61898ad28ed69c5b391eb43e0db9386279b9612c 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() {