Skip to content

Commit

Permalink
replace use of UserGroupMembership::getGroupName()
Browse files Browse the repository at this point in the history
UserGroupMembership::getGroupName() has been hard depreciated since 1.41.
  • Loading branch information
OAuthority authored May 22, 2024
1 parent 76790a9 commit abbab22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/Specials/SpecialManageWikiDefaultPermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Miraheze\ManageWiki\Helpers\ManageWikiPermissions;
use Miraheze\ManageWiki\Hooks;
use Miraheze\ManageWiki\ManageWiki;
use RequestContext;
use SpecialPage;
use UserGroupMembership;

Expand Down Expand Up @@ -75,8 +76,9 @@ public function buildMainView() {
$groups = array_keys( $mwPermissions->list() );
$craftedGroups = [];

// ideally this should be a call to Language::getGroupName( $group ), but that method is not static so this will do
foreach ( $groups as $group ) {
$craftedGroups[UserGroupMembership::getGroupName( $group )] = $group;
$craftedGroups[RequestContext::getMain()->getLanguage()->getGroupName( $group )] = $group;
}

$groupSelector = [];
Expand Down

0 comments on commit abbab22

Please sign in to comment.