diff --git a/checkin_notes b/checkin_notes
index 680717146b..a0fe06d04f 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -14098,3 +14098,17 @@ Karl 2004-06-24
tools/
update_versions
+
+David 24 June 2004
+ - turn off sorting in team member display (slow query)
+ - show only up to 1000 users/teams/hosts
+ - use URL_BASE instead of MASTER_URL in page_tail()
+ - fix php typos
+
+ html/
+ inc/
+ team.inc
+ util.inc
+ user/
+ team_display.php
+ top_*.php
diff --git a/html/inc/team.inc b/html/inc/team.inc
index 306e9d0db0..23b63da5ab 100644
--- a/html/inc/team.inc
+++ b/html/inc/team.inc
@@ -12,7 +12,7 @@ function display_team_page($team, $offset, $sort_by) {
// set the following to turn off sorted output.
// (or use caching)
//
- $nosort = false;
+ $nosort = true;
if ($sort_by == "total_credit") {
$sort_clause = "total_credit desc";
diff --git a/html/inc/util.inc b/html/inc/util.inc
index b3c703a268..35d2fb521d 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -116,7 +116,7 @@ function page_head($title) {
function page_tail($is_main=false) {
echo "
";
if (!$is_main) {
- echo "Return to ".PROJECT." main page
\n";
+ echo "Return to ".PROJECT." main page
\n";
}
// put your copyright notice etc. here
diff --git a/html/user/team_display.php b/html/user/team_display.php
index c72d3b782a..a58a1b7344 100644
--- a/html/user/team_display.php
+++ b/html/user/team_display.php
@@ -7,6 +7,13 @@ $offset = $_GET["offset"];
if (!$offset) $offset=0;
$teamid = $_GET["teamid"];
+if ($offset > 1000) {
+ page_head("Limit exceeded");
+ echo "Sorry, we're currently showing only the first 1000.";
+ page_tail();
+ exit();
+}
+
$cache_args = "teamid=$teamid&sort_by=$sort_by&offset=$offset";
start_cache(3600, $cache_args);
diff --git a/html/user/top_hosts.php b/html/user/top_hosts.php
index 7281b65108..b19a29f96b 100644
--- a/html/user/top_hosts.php
+++ b/html/user/top_hosts.php
@@ -11,6 +11,11 @@
if ($offset < 1000) {
$cache_args = "sort_by=$sort_by&offset=$offset";
start_cache(3600, $cache_args);
+ } else {
+ page_head("Limit exceeded");
+ echo "Sorry - first 1000 only.";
+ page_tail();
+
}
require_once("../inc/util.inc");
diff --git a/html/user/top_teams.php b/html/user/top_teams.php
index 4de83e6d27..6f4deb4ca4 100644
--- a/html/user/top_teams.php
+++ b/html/user/top_teams.php
@@ -8,6 +8,11 @@
if ($offset < 1000) {
$cache_args = "sort_by=$sort_by&offset=$offset";
start_cache(3600, $cache_args);
+ } else {
+ page_head("Limit exceeded");
+ echo "Sorry - first 1000 only.";
+ page_tail();
+
}
require_once("../inc/db.inc");
diff --git a/html/user/top_users.php b/html/user/top_users.php
index 529407511b..fb56e99d14 100644
--- a/html/user/top_users.php
+++ b/html/user/top_users.php
@@ -9,6 +9,10 @@
if ($offset < 1000) {
$cache_args = "sort_by=$sort_by&offset=$offset";
start_cache(3600, $cache_args);
+ } else {
+ page_head("Limit exceeded");
+ echo "Sorry - first 1000 only.";
+ page_tail();
}
require_once("../inc/util.inc");