diff --git a/checkin_notes b/checkin_notes index 2b17e71c5a..32e27e1172 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3218,3 +3218,19 @@ Walt 23 Mar 2006 main.C client/win hostinfo_win.C + +David 24 Mar 2006 + - Let team founders get lists of team members + (including their email addresses) via XML RPC. + The URL is PROJECT/team_email_list.php?teamid=X&account_key=Y&xml=1 + + This feature lets cross-project teams more easily get their + combined email-address list. + It doesn't change BOINC's privacy policy; + team founders could always get member email addresses. + + html/ + inc/ + xml.inc + user/ + team_email_list.php diff --git a/doc/index.php b/doc/index.php index f51350c787..f499a14065 100644 --- a/doc/index.php +++ b/doc/index.php @@ -90,11 +90,11 @@ echo " and copy the URL from your browser's address field).
- More info + More info | Download - | Web sites + | Web sites | Add-ons - | Message boards + | Message boards
diff --git a/doc/web_rpc.php b/doc/web_rpc.php index 985d7132cc..b35363d142 100644 --- a/doc/web_rpc.php +++ b/doc/web_rpc.php @@ -319,5 +319,40 @@ list_item("action", ); list_end(); +echo " +

Get team member list

+"; +list_start(); +list_item('URL', + 'project/team_email_list.php?teamid=X&account_key=Y&xml=1' +); +list_item("input", + 'teamid: database ID of team +
account_key: account key of team founder' +); +list_item("output", + html_text(" + + 1 + pdq@usndathoople.edu + 232f381c79336f0bd8df02bbce2f2217 + 1076897105 + David + United States + 9.907264 + 0.023264 + 1142628426.48937 + usndathoople.edu/~pdq + 1 + + [ ... ] +") +); +list_item('action', + 'Show list of team members. + Requires authentication by team founder.' +); +list_end(); + page_tail(); ?> diff --git a/doc/work.php b/doc/work.php index b0706950a0..e1477bbd32 100644 --- a/doc/work.php +++ b/doc/work.php @@ -57,7 +57,7 @@ list_item( If this bound is exceeded, the application will be aborted." ); list_item( - "rsc_mem_bound", + "rsc_memory_bound", "A bound on the virtual memory working set size. The workunit will only be sent to hosts with at least this much available RAM. diff --git a/html/inc/xml.inc b/html/inc/xml.inc index 363cc14186..e88f7096e3 100644 --- a/html/inc/xml.inc +++ b/html/inc/xml.inc @@ -49,8 +49,8 @@ function show_user_xml($user, $show_hosts) { ".htmlspecialchars($user->url)." $user->has_profile "; - $result = mysql_query("select * from host where userid=$user->id"); if ($show_hosts) { + $result = mysql_query("select * from host where userid=$user->id"); echo " $user->venue\n"; while ($host = mysql_fetch_object($result)) { show_host_xml($host); @@ -60,6 +60,24 @@ echo" "; } +function show_team_member($user) { + $cpid = md5($user->cross_project_id.$user->email_addr); + echo " + $user->id + $user->email_addr + $cpid + $user->create_time + ".htmlspecialchars($user->name)." + $user->country + $user->total_credit + $user->expavg_credit + $user->expavg_time + ".htmlspecialchars($user->url)." + $user->has_profile + +"; +} + function show_team_xml($team) { echo " $team->id diff --git a/html/user/team_email_list.php b/html/user/team_email_list.php index 359fb5a0bd..308c6042ec 100644 --- a/html/user/team_email_list.php +++ b/html/user/team_email_list.php @@ -7,9 +7,39 @@ require_once("../inc/team.inc"); db_init(); -$user = get_logged_in_user(); $teamid = get_int("teamid"); $team = lookup_team($teamid); + +function error($x) { + echo "$x + "; + exit(); +} + +$xml = get_int('xml', true); +if ($xml) { + require_once("../inc/xml.inc"); + xml_header(); + if (!$team) { + error("no such team"); + } + $account_key = get_str('account_key', true); + $user = lookup_user_auth($account_key); + if (!$user || $team->userid != $user->id) { + error("not founder"); + } + echo " + "; + $result = mysql_query("select * from user where teamid=$team->id"); + while ($user = mysql_fetch_object($result)) { + show_team_member($user); + } + echo " + "; + exit(); +} + +$user = get_logged_in_user(); require_founder_login($user, $team); page_head("$team->name Email List");