diff --git a/html/user/team.inc b/html/user/team.inc
index da12fcc1b0..e4e7ae300c 100644
--- a/html/user/team.inc
+++ b/html/user/team.inc
@@ -75,7 +75,7 @@ function display_team_page($team) {
echo "";
$query = sprintf(
- "select * from user where teamid = %d",
+ "select * from user where teamid = %d order by expavg_credit desc",
$team->id
);
$result = mysql_query($query);
diff --git a/html/user/top_hosts.php b/html/user/top_hosts.php
index f3cc73d62a..cf04370d02 100644
--- a/html/user/top_hosts.php
+++ b/html/user/top_hosts.php
@@ -25,12 +25,14 @@ function show_host_row($host) {
";
}
+ $max_hosts_display = 100;
db_init();
page_head("Top hosts");
- $result = mysql_query("select * from host order by expavg_credit desc");
+ $result = mysql_query("select * from host order by expavg_credit desc limit $max_hosts_display");
host_table_start();
- while ($host = mysql_fetch_object($result)) {
+ while (($host = mysql_fetch_object($result)) && $max_hosts_display > 0) {
show_host_row($host);
+ $max_hosts_display--;
}
mysql_free_result($result);
echo "\n";