From c9429ad7a4b371a2e1a905b3bffd3ee0168dc4f9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 17 Nov 2007 21:59:46 +0000 Subject: [PATCH] - user web: if join team while already in a team, create outgoing delta also svn path=/trunk/boinc/; revision=14244 --- checkin_notes | 11 +++++++++++ html/inc/host.inc | 2 +- html/inc/team.inc | 1 + html/user/team_join.php | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 143bfa145e..b4428ee46f 100644 --- a/checkin_notes +++ b/checkin_notes @@ -11205,3 +11205,14 @@ David 17 Nov 2007 html/user/ edit_forum_preferences_action.php + +David 17 Nov 2007 + - user web: if join team while already in a team, + create outgoing delta also + + html/ + inc/ + host.inc + team.inc + user/ + team_join.php diff --git a/html/inc/host.inc b/html/inc/host.inc index 3a6b07d782..c05af3b37f 100644 --- a/html/inc/host.inc +++ b/html/inc/host.inc @@ -321,7 +321,7 @@ function hosts_compatible($host1, $host2) { // if ($host1->total_credit && $host2->total_credit) { if (!times_disjoint($host1, $host2)) { - echo "
h2 $host2->create_time $host2->rpc_time"; + //echo "
h2 $host2->create_time $host2->rpc_time"; return false; } } diff --git a/html/inc/team.inc b/html/inc/team.inc index f8ee10f2ec..806665df5b 100644 --- a/html/inc/team.inc +++ b/html/inc/team.inc @@ -296,6 +296,7 @@ function show_team_row($team, $i) { } function user_join_team($team, $user) { + user_quit_team($user); $res = $user->update("teamid=$team->id"); if ($res) { $now = time(); diff --git a/html/user/team_join.php b/html/user/team_join.php index 8c29d6bbb7..9629bfc152 100644 --- a/html/user/team_join.php +++ b/html/user/team_join.php @@ -11,7 +11,7 @@ $teamid = get_int("teamid"); $team = BoincTeam::lookup_id($teamid); require_team($team); if ($user->teamid == $team->id) { - page_head("Unable to add $user->name"); + page_head("Already a member"); echo "You are already a member of $team->name."; } else { $success = user_join_team($team, $user);