From 89eccc9b74482b8c636a02d3a6bcf3ec2947eb7b Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Sat, 21 Nov 1998 03:18:33 +0000 Subject: Backed out Andrew's patch -- turns out it was doing quoting sublty wrong. --- buglist.cgi | 137 ++++++++++++++++++++++++++++-------------------------------- 1 file changed, 65 insertions(+), 72 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index c0cf44d47..8439ccbbd 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -24,18 +24,13 @@ use strict; require "CGI.pl"; -my $serverpush = 0; +my $serverpush = 1; -# 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 ($ENV{'HTTP_USER_AGENT'} =~ /MSIE/) { + # Internet explorer doesn't seem to understand server push. What fun. + $serverpush = 0; } - if ($serverpush) { print "Content-type: multipart/x-mixed-replace;boundary=thisrandomstring\n"; print "\n"; @@ -68,47 +63,46 @@ 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\n\n"; +Refresh: 0; URL=$url -PutHeader("What a hack."); -print " +What a hack. 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\n\n"; +Content-type: text/html -PutHeader("Forget what?"); -print " + +Forget what? 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\n\n"; +Content-type: text/html -PutHeader("OK, done."); -print " + +OK, done. 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\n\n"; + print "Content-type: text/html -PutHeader("Picky, picky."); -print " + +Picky, picky. Query names can only have letters, digits, spaces, or underbars. You entered \"$::FORM{'newqueryname'}\", which doesn't cut it.

@@ -118,15 +112,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\n\n"; +Content-type: text/html -PutHeader("OK, default is set."); -print " + +OK, default is set. 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; }; } @@ -231,8 +225,7 @@ if (defined $::FORM{'sql'}) { } } else { my $ref = $::MFORM{$field}; - foreach my $vv (@$ref) { - my $v = url_decode($vv); + foreach my $v (@$ref) { if ($v eq "(empty)") { $query .= "\t\t${or}bugs.$field is null\n"; } else { @@ -335,20 +328,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}"; @@ -377,9 +370,9 @@ while (@row = FetchSQLData()) { pnl "
$tablestart"; } push @bugarray, $bug_id; - pnl "
"; + pnl "
"; if ($dotweak) { - pnl ""; + pnl ""; } pnl ""; pnl "$bug_id "; @@ -455,9 +448,9 @@ if (open (COMMENTS, "$quip\n"; +print "
$quip\n"; print "\n"; -print "
$tablestart\n"; +print "
$tablestart\n"; print $::bugl; print "
\n"; @@ -480,7 +473,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; @@ -504,52 +497,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++; @@ -558,38 +551,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. @@ -597,15 +590,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