Skip to content

Commit

Permalink
web: fix error in team display: array_unique() doesn't work on objects
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpanderson committed Mar 20, 2024
1 parent 3b73f7b commit 8021e45
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 8021e45

Please sign in to comment.