From 0ca30382be83fccfc4e352096c87c56bbf8a673c Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Tue, 17 Nov 1998 03:43:49 +0000 Subject: Patch by Andrew Anderson . Many minor bugfixes and cleanup. --- buglist.cgi | 137 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 72 insertions(+), 65 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 8439ccbbd..c0cf44d47 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -24,13 +24,18 @@ use strict; require "CGI.pl"; -my $serverpush = 1; +my $serverpush = 0; -if ($ENV{'HTTP_USER_AGENT'} =~ /MSIE/) { - # Internet explorer doesn't seem to understand server push. What fun. - $serverpush = 0; +# Internet explorer and Lynx don't seem to understand server push. What fun. +# Carefully coded to cope with the fact that MSIE puts both "MSIE" and +# "Mozilla" in its user agent string. + +$_ = $ENV{'HTTP_USER_AGENT'}; +if ($_ =~/Mozilla/ && $_ !~ /MSIE/) { + $serverpush = 1; } + if ($serverpush) { print "Content-type: multipart/x-mixed-replace;boundary=thisrandomstring\n"; print "\n"; @@ -63,46 +68,47 @@ if (!defined $::FORM{'cmdtype'}) { CMD: for ($::FORM{'cmdtype'}) { /^runnamed$/ && do { $::buffer = $::COOKIE{"QUERY_" . $::FORM{"namedcmd"}}; - ProcessFormFields $::buffer; + ProcessFormFields($::buffer); last CMD; }; /^editnamed$/ && do { my $url = "query.cgi?" . $::COOKIE{"QUERY_" . $::FORM{"namedcmd"}}; print "Content-type: text/html -Refresh: 0; URL=$url +Refresh: 0; URL=$url\n\n"; -What a hack. +PutHeader("What a hack."); +print " Loading your query named $::FORM{'namedcmd'}..."; exit; }; /^forgetnamed$/ && do { print "Set-Cookie: QUERY_" . $::FORM{'namedcmd'} . "= ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT -Content-type: text/html +Content-type: text/html\n\n"; - -Forget what? +PutHeader("Forget what?"); +print " OK, the $::FORM{'namedcmd'} query is gone.

-Go back to the query page."; +Go back to the query page. +"; exit; }; /^asnamed$/ && do { if ($::FORM{'newqueryname'} =~ /^[a-zA-Z0-9_ ]+$/) { print "Set-Cookie: QUERY_" . $::FORM{'newqueryname'} . "=$::buffer ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT -Content-type: text/html +Content-type: text/html\n\n"; - -OK, done. +PutHeader("OK, done."); +print " OK, you now have a new query named $::FORM{'newqueryname'}. -

- -Go back to the query page."; +Go back to the query page. +"; } else { - print "Content-type: text/html + print "Content-type: text/html\n\n"; - -Picky, picky. +PutHeader("Picky, picky."); +print " Query names can only have letters, digits, spaces, or underbars. You entered \"$::FORM{'newqueryname'}\", which doesn't cut it.

@@ -112,15 +118,15 @@ Click the Back button and type in a valid name for this query."; }; /^asdefault$/ && do { print "Set-Cookie: DEFAULTQUERY=$::buffer ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT -Content-type: text/html +Content-type: text/html\n\n"; - -OK, default is set. +PutHeader("OK, default is set."); +print " OK, you now have a new default query.

-Go back to the query page, using the new default."; +Go back to the query page, using the new default."; exit; }; } @@ -225,7 +231,8 @@ if (defined $::FORM{'sql'}) { } } else { my $ref = $::MFORM{$field}; - foreach my $v (@$ref) { + foreach my $vv (@$ref) { + my $v = url_decode($vv); if ($v eq "(empty)") { $query .= "\t\t${or}bugs.$field is null\n"; } else { @@ -328,20 +335,20 @@ if (defined $::FORM{'order'}) { } if ($dotweak) { - pnl "

"; + pnl ""; } -my $tablestart = " -
+my $tablestart = " +
ID"; foreach my $c (@collist) { if (exists $::needquote{$c}) { if ($::needquote{$c}) { - $tablestart .= ""; + $tablestart .= ""; } else { - $tablestart .= ""; + $tablestart .= ""; } if (defined $::sortkey{$c}) { $tablestart .= "$::title{$c}"; @@ -370,9 +377,9 @@ while (@row = FetchSQLData()) { pnl "
$tablestart"; } push @bugarray, $bug_id; - pnl "
"; + pnl "
"; if ($dotweak) { - pnl ""; + pnl ""; } pnl ""; pnl "$bug_id "; @@ -448,9 +455,9 @@ if (open (COMMENTS, "$quip\n"; +print "
$quip\n"; print "\n"; -print "
$tablestart\n"; +print "
$tablestart\n"; print $::bugl; print "
\n"; @@ -473,7 +480,7 @@ function SetCheckboxes(value) { item.checked = value; } } -document.write(\" \"); +document.write(\" \"); "; my $resolution_popup = make_options(\@::legal_resolution_no_dup, "FIXED"); my @prod_list = keys %prodhash; @@ -497,52 +504,52 @@ document.write(\" - - - - + + + + - - - - + + + + - - - - + + + +
Product:Version:Product:Version:
Platform:Priority:Platform:Priority:
Component:Severity:Component:Severity:
- + Additional Comments:
-
"; +
"; # knum is which knob number we're generating, in javascript terms. my $knum = 0; print " - + Do nothing else
"; $knum++; print " - + Accept bugs (change status to ASSIGNED)
"; $knum++; if (!defined $statushash{'CLOSED'} && !defined $statushash{'VERIFIED'} && !defined $statushash{'RESOLVED'}) { print " - + Clear the resolution
"; $knum++; print " - + Resolve bugs, changing resolution to -
"; $knum++; @@ -551,38 +558,38 @@ document.write(\" Reopen bugs
"; + Reopen bugs
"; $knum++; } my @statuskeys = keys %statushash; if ($#statuskeys == 1) { if (defined $statushash{'RESOLVED'}) { print " - + Mark bugs as VERIFIED
"; $knum++; } if (defined $statushash{'VERIFIED'}) { print " - + Mark bugs as CLOSED
"; $knum++; } } print " - + Reassign bugs to -
"; $knum++; - print " + print " Reassign bugs to owner of selected component
"; $knum++; print "

- + To make changes to a bunch of bugs at once:

  1. Put check boxes next to the bugs you want to change. @@ -590,15 +597,15 @@ To make changes to a bunch of bugs at once: comment explaining what you're doing.)
  2. Click the below \"Commit\" button.
- +
\n"; } if ($count > 0) { - print "
- - + print " + + Query Page Change columns
"; -- cgit v1.2.3-24-g4f1b