From 44682785aebece04a14273c34be2bc1d784ab3b4 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" Date: Sat, 22 Jan 2000 16:51:49 +0000 Subject: [PATCH] Patch by Klaas Freitag , with modifications by me -- don't generate HTML tables with more than 50 lines, as browsers generally can't cope with huge tables. git-svn-id: svn://10.0.0.236/trunk@58402 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/describekeywords.cgi | 11 ++++++++++- mozilla/webtools/bugzilla/editkeywords.cgi | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/bugzilla/describekeywords.cgi b/mozilla/webtools/bugzilla/describekeywords.cgi index fc0fe10bffc..c8015826760 100755 --- a/mozilla/webtools/bugzilla/describekeywords.cgi +++ b/mozilla/webtools/bugzilla/describekeywords.cgi @@ -31,7 +31,7 @@ print "Content-type: text/html\n\n"; PutHeader("Bugzilla keyword description"); -print qq{ +my $tableheader = qq{ @@ -40,6 +40,10 @@ print qq{ }; +print $tableheader; +my $line_count = 0; +my $max_table_size = 50; + SendSQL("SELECT keyworddefs.name, keyworddefs.description, COUNT(keywords.bug_id), keywords.bug_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid @@ -59,6 +63,11 @@ while (MoreSQLData()) { } else { $bugs = "none"; } + if ($line_count == $max_table_size) { + print "
Name
\n$tableheader"; + $line_count = 0; + } + $line_count++; print qq{ $name diff --git a/mozilla/webtools/bugzilla/editkeywords.cgi b/mozilla/webtools/bugzilla/editkeywords.cgi index 3443a5c3f71..da9ec1b1cb6 100755 --- a/mozilla/webtools/bugzilla/editkeywords.cgi +++ b/mozilla/webtools/bugzilla/editkeywords.cgi @@ -125,7 +125,7 @@ my $action = trim($::FORM{action} || ''); if ($action eq "") { PutHeader("Select keyword"); - print qq{ + my $tableheader = qq{ @@ -134,6 +134,10 @@ if ($action eq "") { }; + print $tableheader; + my $line_count = 0; + my $max_table_size = 50; + SendSQL("SELECT keyworddefs.id, keyworddefs.name, keyworddefs.description, COUNT(keywords.bug_id), keywords.bug_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id = keywords.keywordid @@ -151,6 +155,12 @@ if ($action eq "") { # what it had responded. $bugs = 'none'; } + if ($line_count == $max_table_size) { + print "
Edit keyword ...Action
\n$tableheader"; + $line_count = 0; + } + $line_count++; + print qq{ $name