aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2001-08-21 07:36:54 +0000
committergerv%gerv.net <>2001-08-21 07:36:54 +0000
commitf210bb460c786a31bc7677f0e547a67880997558 (patch)
treeff2b77a66c5d6bcbdd81591d1e24cec320bcf8b3
parent126c2d754cfd61217b1d097e9adac9092ac27a29 (diff)
downloadbugs-f210bb460c786a31bc7677f0e547a67880997558.tar
bugs-f210bb460c786a31bc7677f0e547a67880997558.tar.gz
bugs-f210bb460c786a31bc7677f0e547a67880997558.tar.bz2
bugs-f210bb460c786a31bc7677f0e547a67880997558.tar.xz
bugs-f210bb460c786a31bc7677f0e547a67880997558.zip
Bug 96063 - the old method of doing this barfed on long URL strings.
-rwxr-xr-xduplicates.cgi77
1 files changed, 48 insertions, 29 deletions
diff --git a/duplicates.cgi b/duplicates.cgi
index 2fccac234..d1640cbf6 100755
--- a/duplicates.cgi
+++ b/duplicates.cgi
@@ -115,31 +115,10 @@ if (<data/duplicates/dupes$before*>)
print Param("mostfreqhtml");
-my $commabugs = join(",", keys(%count));
-
-print "
-<p>
-<a href=\"buglist.cgi?bug_id=$commabugs\">Give me this list as a Bugzilla bug list.</a>
-</p>
-
-<table BORDER>
-<tr BGCOLOR=\"#CCCCCC\">
-
-<td><center><b>
-<a href=\"duplicates.cgi?sortby=bug_no&maxrows=$maxrows&changedsince=$changedsince\">Bug #</a>
-</b></center></td>
-<td><center><b>
-<a href=\"duplicates.cgi?sortby=dup_count&maxrows=$maxrows&changedsince=$changedsince\">Dupe<br>Count</a>
-</b></center></td>\n";
-
my %delta;
if ($dobefore)
{
- print "<td><center><b>
- <a href=\"duplicates.cgi?sortby=delta&maxrows=$maxrows&changedsince=$changedsince\">Change in
- last<br>$changedsince day(s)</a></b></center></td>";
-
# Calculate the deltas if we are doing a "before"
foreach (keys(%count))
{
@@ -147,14 +126,6 @@ if ($dobefore)
}
}
-print "
-<td><center><b>Component</b></center></td>
-<td><center><b>Severity</b></center></td>
-<td><center><b>Op Sys</b></center></td>
-<td><center><b>Target<br>Milestone</b></center></td>
-<td><center><b>Summary</b></center></td>
-</tr>\n\n";
-
# Sort, if required
my @sortedcount;
@@ -173,6 +144,54 @@ elsif ($sortby eq "dup_count")
my $i = 0;
+# Produce a string of bug numbers for a Bugzilla buglist.
+my $commabugs = "";
+foreach (@sortedcount)
+{
+ last if ($i == $maxrows);
+
+ $commabugs .= ($_ . ",");
+ $i++;
+}
+
+# Avoid having a comma at the end - Bad Things happen.
+chop $commabugs;
+
+print qq|
+
+<form method="POST" action="buglist.cgi">
+<input type="hidden" name="bug_id" value="$commabugs">
+<input type="hidden" name="order" value="Reuse same sort as last time">
+Give this to me as a <input type="submit" value="Bug List">. (Note: the order may not be the same.)
+</form>
+
+<table BORDER>
+<tr BGCOLOR="#CCCCCC">
+
+<td><center><b>
+<a href="duplicates.cgi?sortby=bug_no&maxrows=$maxrows&changedsince=$changedsince">Bug #</a>
+</b></center></td>
+<td><center><b>
+<a href="duplicates.cgi?sortby=dup_count&maxrows=$maxrows&changedsince=$changedsince">Dupe<br>Count</a>
+</b></center></td>\n|;
+
+if ($dobefore)
+{
+ print "<td><center><b>
+ <a href=\"duplicates.cgi?sortby=delta&maxrows=$maxrows&changedsince=$changedsince\">Change in
+ last<br>$changedsince day(s)</a></b></center></td>";
+}
+
+print "
+<td><center><b>Component</b></center></td>
+<td><center><b>Severity</b></center></td>
+<td><center><b>Op Sys</b></center></td>
+<td><center><b>Target<br>Milestone</b></center></td>
+<td><center><b>Summary</b></center></td>
+</tr>\n\n";
+
+$i = 0;
+
foreach (@sortedcount)
{
my $id = $_;