From 0772d22a1750ae8bfc37c6bc0a48b5c195b77ac4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 8 Aug 2003 22:17:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2043 --- html/user/team_quit_action.php | 2 +- html/user/team_remove_inactive_action.php | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/html/user/team_quit_action.php b/html/user/team_quit_action.php index 4c746440b7..5e6096061c 100644 --- a/html/user/team_quit_action.php +++ b/html/user/team_quit_action.php @@ -40,7 +40,7 @@ page_head("Quit $team_name"); echo "

Removed from team

"; echo "You have been removed from id>$team_name"; - if (!$new_nusers) { + if ($new_nusers <= 0) { echo "

Since you were the last member of the team, it has been disbanded."; } } else { diff --git a/html/user/team_remove_inactive_action.php b/html/user/team_remove_inactive_action.php index 091d5ca9dc..6c4724f9d9 100644 --- a/html/user/team_remove_inactive_action.php +++ b/html/user/team_remove_inactive_action.php @@ -1,4 +1,4 @@ -nusers - $nmembers; - $query = "update team set nusers = $new_nusers where id = $team->id"; + $new_nusers = $team->nusers - $nmembers; + if ($new_nusers > 0) { + $query = "update team set nusers = $new_nusers where id = $team->id"; + } else { + $query = "remove team where id=$team->id"; + echo "

The team has been disbanded because there are no more members."; + } $result = mysql_query($query); page_tail(); -?> +} ?>