permission = $permission; if ( !count( $errors ) ) { $groups = array_map( [ 'User', 'makeGroupLinkWiki' ], User::getGroupsWithPermission( $this->permission ) ); if ( $groups ) { $errors[] = [ 'badaccess-groups', $wgLang->commaList( $groups ), count( $groups ) ]; } else { $errors[] = [ 'badaccess-group0' ]; } } $this->errors = $errors; } public function report() { global $wgOut; $wgOut->showPermissionsErrorPage( $this->errors, $this->permission ); $wgOut->output(); } }