From 91f9bc0ff29f70e6eb610415c3c05848c765b683 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Sun, 23 Jan 2000 00:51:49 +0000 Subject: 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. --- describekeywords.cgi | 11 ++++++++++- editkeywords.cgi | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/describekeywords.cgi b/describekeywords.cgi index fc0fe10bf..c80158267 100755 --- a/describekeywords.cgi +++ b/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/editkeywords.cgi b/editkeywords.cgi index 3443a5c3f..da9ec1b1c 100755 --- a/editkeywords.cgi +++ b/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 -- cgit v1.2.3-24-g4f1b