Skip to content

Commit

Permalink
Merge pull request #10377 from bozana/10375
Browse files Browse the repository at this point in the history
#10375 Corectly consider roles removed from masthead with …
  • Loading branch information
bozana committed Sep 9, 2024
2 parents d33f414 + 1765240 commit eb38e39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct($action, $locales, $context)
->toArray();

// sort the mashead roles in their saved order
$sortedAllMastheadUserGroups = array_replace(array_flip($savedMastheadUserGroupIdsOrder), $allMastheadUserGroups);
$sortedAllMastheadUserGroups = array_replace(array_intersect_key(array_flip($savedMastheadUserGroupIdsOrder), $allMastheadUserGroups), $allMastheadUserGroups);

foreach ($sortedAllMastheadUserGroups as $userGroup) {
$mastheadOptions[] = [
Expand Down
4 changes: 2 additions & 2 deletions pages/about/AboutContextHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function editorialMasthead($args, $request)
->toArray();

// sort the masthead roles in their saved order for display
$mastheadRoles = array_replace(array_flip($savedMastheadUserGroupIdsOrder), $allMastheadUserGroups);
$mastheadRoles = array_replace(array_intersect_key(array_flip($savedMastheadUserGroupIdsOrder), $allMastheadUserGroups), $allMastheadUserGroups);

$allUsersIdsGroupedByUserGroupId = Repo::userGroup()->getMastheadUserIdsByRoleIds($mastheadRoles, $context->getId());

Expand Down Expand Up @@ -152,7 +152,7 @@ public function editorialHistory($args, $request)
->toArray();

// sort the masthead roles in their saved order for display
$mastheadRoles = array_replace(array_flip($savedMastheadUserGroupIdsOrder), $allMastheadUserGroups);
$mastheadRoles = array_replace(array_intersect_key(array_flip($savedMastheadUserGroupIdsOrder), $allMastheadUserGroups), $allMastheadUserGroups);

$allUsersIdsGroupedByUserGroupId = Repo::userGroup()->getMastheadUserIdsByRoleIds($mastheadRoles, $context->getId(), UserUserGroupStatus::STATUS_ENDED);

Expand Down

0 comments on commit eb38e39

Please sign in to comment.