From 6c5fc14a233199a96145b3626998d3b50d46cf36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Sun, 20 Jun 2010 08:35:36 +0000 Subject: [PATCH] user web: flag to send less information on team member XML requests (from Willy de Zutter). svn path=/trunk/boinc/; revision=21780 --- checkin_notes | 10 ++++++++++ html/inc/xml.inc | 16 ++++++++++------ html/user/team_email_list.php | 3 ++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index b142508176..8d436b647a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4419,3 +4419,13 @@ Charlie 18 Jun 2010 clientgui/ MainDocument.cpp, .h + +Rytis 20 Jun 2010 + - user web: flag to send less information on team member XML requests + (from Willy de Zutter). + + html/ + inc/ + xml.inc + user/ + team_email_list.php diff --git a/html/inc/xml.inc b/html/inc/xml.inc index 16cc555e10..0628b48224 100644 --- a/html/inc/xml.inc +++ b/html/inc/xml.inc @@ -86,25 +86,29 @@ echo" "; } -function show_team_member($user, $show_email) { +function show_team_member($user, $show_email, $creditonly = false) { + if ($creditonly && !$user->total_credit) { return; } $cpid = md5($user->cross_project_id.$user->email_addr); echo " $user->id + $cpid "; if ($show_email && $user->send_email) { - echo "$user->email_addr + echo " $user->email_addr "; } - echo "$cpid - $user->create_time + echo " $user->total_credit"; + if (!$creditonly) { + echo " $user->create_time ".htmlspecialchars($user->name)." $user->country - $user->total_credit $user->expavg_credit $user->expavg_time ".htmlspecialchars($user->url)." $user->has_profile - +"; + } + echo " "; } diff --git a/html/user/team_email_list.php b/html/user/team_email_list.php index 4508e77dcf..2704e2184d 100644 --- a/html/user/team_email_list.php +++ b/html/user/team_email_list.php @@ -23,6 +23,7 @@ require_once("../inc/team.inc"); $xml = get_int('xml', true); if ($xml) { + $creditonly = get_int('creditonly', true); require_once("../inc/xml.inc"); xml_header(); $retval = db_init_xml(); @@ -39,7 +40,7 @@ if ($xml) { $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id"); //$users = BoincUser::enum("teamid=$team->id"); foreach($users as $user) { - show_team_member($user, $show_email); + show_team_member($user, $show_email, $creditonly); } echo "\n"; exit();