Skip to content

Commit

Permalink
Merge pull request #5544 from BOINC/dpa_team3
Browse files Browse the repository at this point in the history
web: fix error in team display: array_unique() doesn't work on objects
  • Loading branch information
AenBleidd authored Mar 20, 2024
2 parents 3b73f7b + 8021e45 commit 87dc71e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions html/inc/team.inc
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ function display_team_page($team, $user) {
if (count($team->new_members)) {
$first = true;
$x = "";
foreach ($team->new_members as $a) {
foreach ($team->new_members as $id) {
$u = BoincUser::lookup_id($id);
if (!$u) continue;
if ($first) {
$first = false;
} else {
$x .= " · ";
}
$x .= user_links($a, BADGE_HEIGHT_MEDIUM);
$x .= user_links($u, BADGE_HEIGHT_MEDIUM);
}
}
row2(tra('New members in last day'), $x);
Expand Down Expand Up @@ -354,7 +356,7 @@ function new_member_list($teamid) {
foreach ($deltas as $delta) {
$u = BoincUser::lookup_id($delta->userid);
if ($u->teamid == $teamid) {
$new_members[] = $u; // they might have later quit
$new_members[] = $u->id; // they might have later quit
}
}
return array_unique($new_members);
Expand Down

0 comments on commit 87dc71e

Please sign in to comment.