web: fix some PHP warnings

This commit is contained in:
David Anderson 2013-05-07 00:53:06 -07:00
parent 250251d258
commit b0555bbf24
3 changed files with 7 additions and 7 deletions

View File

@ -344,17 +344,16 @@ function show_user_summary_public($user) {
// @param user The user to produce a community links object for
function get_community_links_object($user){
$cache_object = new StdClass;
$cache_object->post_count = total_posts($user);
$cache_object->user = $user;
$cache_object->team = lookup_team($user->teamid);
$cache_object->friends = array();
$friends = BoincFriend::enum("user_src=$user->id and reciprocated=1");
$n = count($friends);
if ($n) {
foreach($friends as $friend) {
$fuser = BoincUser::lookup_id($friend->user_dest);
$cache_object->friends[] = $fuser;
}
foreach($friends as $friend) {
$fuser = BoincUser::lookup_id($friend->user_dest);
$cache_object->friends[] = $fuser;
}
return $cache_object;
}

View File

@ -75,6 +75,7 @@ if ($format=="xml"){
$user = @get_other_projects($user);
$community_links = get_community_links_object($user);
$data = new StdClass;
$data->user = $user;
$data->clo = $community_links;
set_cached_data(USER_PAGE_TTL, serialize($data), $cache_args);

View File

@ -39,7 +39,7 @@ if ($xml) {
$user = lookup_user_auth($account_key);
$show_email = ($user && is_team_founder($user, $team));
echo "<users>\n";
$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_fields("id, email_addr, send_email, name, total_credit, expavg_credit, expavg_time, 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, $creditonly);