diff --git a/html/inc/host.inc b/html/inc/host.inc index 48d32de79b..3348901f5a 100644 --- a/html/inc/host.inc +++ b/html/inc/host.inc @@ -155,17 +155,17 @@ function show_host($host, $user, $ipprivate) { $x = $host->p_iops/1e9; $y = round($x, 2); row2(tra("Measured integer speed"), tra("%1 billion ops/sec", $y)); - $x = $host->n_bwup/KILO; + $x = $host->n_bwup/MEGA; $y = round($x, 2); if ($y > 0) { - row2(tra("Average upload rate"), tra("%1 KB/sec", $y)); + row2(tra("Average upload rate"), tra("%1 MB/sec", $y)); } else { row2(tra("Average upload rate"), tra("Unknown")); } - $x = $host->n_bwdown/KILO; + $x = $host->n_bwdown/MEGA; $y = round($x, 2); if ($y > 0) { - row2(tra("Average download rate"), tra("%1 KB/sec", $y)); + row2(tra("Average download rate"), tra("%1 MB/sec", $y)); } else { row2(tra("Average download rate"), tra("Unknown")); } diff --git a/html/inc/team.inc b/html/inc/team.inc index f44d4d4939..6109cd9d4a 100644 --- a/html/inc/team.inc +++ b/html/inc/team.inc @@ -86,7 +86,6 @@ function display_team_page($team, $user) { global $team_name_sites; page_head("$team->name"); - echo sanitize_html($team->name_html); echo "
"; start_table(); row1(tra('Team info')); diff --git a/html/inc/user.inc b/html/inc/user.inc index 8cf35608d3..cf1ab44677 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -121,10 +121,19 @@ function show_other_projects($user, $personal) { usort($user->projects, "cmp"); if ($personal) { - echo "
',
+ '
',
url_base(),
$user->id,
tra("View the profile of %1", $user->name),
@@ -373,6 +376,10 @@ function friend_links($user) {
// if $name_limit, limit name to N chars
//
function user_links($user, $badge_height=0, $name_limit=0) {
+ if (!$user) {
+ error_log("user_links(): null arg\n");
+ return;
+ }
BoincForumPrefs::lookup($user);
if (is_banished($user)) {
return "(banished: ID $user->id)";
@@ -521,9 +528,8 @@ function show_user_summary_public($user) {
}
}
-// Returns a cacheable community links data object
-// @param user The user to produce a community links object for
-
+// return an object with data to show the user's community links
+//
function get_community_links_object($user){
$cache_object = new StdClass;
$cache_object->post_count = total_posts($user);
@@ -544,6 +550,10 @@ function get_community_links_object($user){
//
function community_links($clo, $logged_in_user){
$user = $clo->user;
+ if (!$user) {
+ error_log("community_links(): null user\n");
+ return;
+ }
$team = $clo->team;
$friends = $clo->friends;
$tot = $clo->post_count;
@@ -552,7 +562,7 @@ function community_links($clo, $logged_in_user){
if ($user->teamid && $team) {
row2(tra("Team"), "id\">$team->name");
} else {
- row2(tra("Team"), tra("None"));
+ row2(tra("Team"), '—');
}
}
if (!DISABLE_FORUMS) {
@@ -593,16 +603,27 @@ function show_account_private($user) {
grid(
false,
function() use ($user) {
- start_table();
- row1(tra("Account information"), 2, 'heading');
- show_user_info_private($user);
- show_preference_links();
- show_user_stats_private($user);
-
+ panel(
+ tra("Account information"),
+ function() use ($user) {
+ start_table();
+ show_user_info_private($user);
+ end_table();
+ }
+ );
+ if (!NO_COMPUTING || !NO_STATS || !NO_HOSTS) {
+ panel(
+ tra("Computing"),
+ function() use($user) {
+ start_table();
+ show_user_stats_private($user);
+ end_table();
+ }
+ );
+ }
if (function_exists('show_user_donations_private')) {
show_user_donations_private($user);
}
- end_table();
if (!NO_COMPUTING) {
show_other_projects($user, true);
}
@@ -611,10 +632,22 @@ function show_account_private($user) {
}
},
function() use ($user) {
- start_table();
- row1(tra("Community"));
- show_community_private($user);
- end_table();
+ panel(
+ tra("Community"),
+ function() use ($user) {
+ start_table();
+ show_community_private($user);
+ end_table();
+ }
+ );
+ panel(
+ tra("Preferences"),
+ function() use($user) {
+ start_table();
+ show_preference_links();
+ end_table();
+ }
+ );
}
);
}
diff --git a/html/user/custom_dark.css b/html/user/custom_dark.css
index d7f6a483d1..2ddaf0e847 100644
--- a/html/user/custom_dark.css
+++ b/html/user/custom_dark.css
@@ -8,6 +8,10 @@ body, navbar-text, panel {
color:white;
}
+.panel-body .table {
+ background-color: #303030;
+}
+
table a:not(.btn), .table a:not(.btn), a:not(.btn) {
color: #EA9185;
text-decoration: none;
diff --git a/html/user/edit_forum_preferences_form.php b/html/user/edit_forum_preferences_form.php
index 5aceeb0324..a89c378b82 100644
--- a/html/user/edit_forum_preferences_form.php
+++ b/html/user/edit_forum_preferences_form.php
@@ -154,7 +154,7 @@ $blocked_str = "";
foreach ($blocked_users as $id) {
if ($id) {
$blocked_user = BoincUser::lookup_id((int)$id);
- if (!$blocked) {
+ if (!$blocked_user) {
echo "Missing user $id";
continue;
}
diff --git a/html/user/show_user.php b/html/user/show_user.php
index c0a99d59a5..55e851784f 100644
--- a/html/user/show_user.php
+++ b/html/user/show_user.php
@@ -90,23 +90,35 @@ if ($format=="xml"){
$logged_in_user = get_logged_in_user(false);
page_head($user->name);
- start_table();
- echo "