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. --- CGI.pl | 21 ++++---- bug_form.pl | 2 +- buglist.cgi | 137 +++++++++++++++++++++++++---------------------------- changepassword.cgi | 20 ++++---- colchange.cgi | 22 ++++----- doeditowners.cgi | 4 +- doeditparams.cgi | 4 +- editowners.cgi | 12 ++--- editparams.cgi | 26 +++++----- enter_bug.cgi | 8 ++-- post_bug.cgi | 15 ++---- process_bug.cgi | 69 ++++++++++++--------------- query.cgi | 135 +++++++++++++++++++++++++--------------------------- relogin.cgi | 6 +-- reports.cgi | 20 ++++---- sanitycheck.cgi | 3 +- show_bug.cgi | 15 +++--- 17 files changed, 243 insertions(+), 276 deletions(-) diff --git a/CGI.pl b/CGI.pl index 89768775a..f16640bc1 100644 --- a/CGI.pl +++ b/CGI.pl @@ -39,8 +39,8 @@ sub GeneratePersonInput { } sub GeneratePeopleInput { - my ($field, $size, $def_value) = (@_); - return ""; + my ($field, $def_value) = (@_); + return ""; } @@ -187,15 +187,15 @@ sub make_options { } $last = $item; if ($isregexp ? $item =~ $default : $default eq $item) { - $popup .= " " . url_decode($item) . "\n"; + $popup .= "$item"; $found = 1; } else { - $popup .= " " . url_decode($item) . "\n"; + $popup .= "$item"; } } } if (!$found && $default ne "") { - $popup .= " $default\n"; + $popup .= "$default"; } return $popup; } @@ -203,9 +203,9 @@ sub make_options { sub make_popup { my ($name,$src,$default,$listtype,$onchange) = (@_); - my $popup = " 0) { - $popup .= " SIZE=\"5\""; + $popup .= " SIZE=5"; if ($listtype == 2) { $popup .= " MULTIPLE"; } @@ -246,8 +246,7 @@ sub confirm_login { if ($enteredlogin !~ /^[^@, ]*@[^@, ]*\.[^@, ]*$/) { print "Content-type: text/html\n\n"; - PutHeader("Invalid e-mail address entered"); - + print "Invalid e-mail address entered.\n"; print "The e-mail address you entered\n"; print "($enteredlogin) didn't match our minimal\n"; print "syntax checking for a legal email address. A legal\n"; @@ -303,7 +302,7 @@ To use the wonders of bugzilla, you can use the following: my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2)); if ($realcryptpwd eq "" || $enteredcryptpwd ne $realcryptpwd) { print "Content-type: text/html\n\n"; - PutHeader("Login failed."); + print "Login failed.\n"; print "The username or password you entered is not valid.\n"; print "Please click Back and try again.\n"; exit; @@ -345,7 +344,7 @@ To use the wonders of bugzilla, you can use the following: if ($loginok ne "1") { print "Content-type: text/html\n\n"; - PutHeader("Please log in."); + print "Please log in.\n"; print "I need a legitimate e-mail address and password to continue.\n"; if (!defined $nexturl || $nexturl eq "") { # Sets nexturl to be argv0, stripping everything up to and diff --git a/bug_form.pl b/bug_form.pl index 287b6ad12..ed6aead8a 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -39,7 +39,7 @@ select short_desc, date_format(creation_ts,'Y-m-d') from bugs -where bug_id = '" . $::FORM{'id'} . "'"; +where bug_id = $::FORM{'id'}"; SendSQL($query); my %bug; 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: - $product_popup - Version: - $version_popup + Product: + $product_popup + Version: + $version_popup - Platform: - $platform_popup - Priority: - $priority_popup + Platform: + $platform_popup + Priority: + $priority_popup - Component: - $component_popup - Severity: - $sev_popup + Component: + $component_popup + Severity: + $sev_popup - + 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 - $resolution_popup"; $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: 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.) Click the below \"Commit\" button. - + \n"; } if ($count > 0) { - print " - - + print " + + Query Page Change columns "; diff --git a/changepassword.cgi b/changepassword.cgi index 37543768b..a3a17e39a 100755 --- a/changepassword.cgi +++ b/changepassword.cgi @@ -24,20 +24,20 @@ require "CGI.pl"; confirm_login(); if (! defined $::FORM{'pwd1'}) { - print "Content-type: text/html\n\n"; - PutHeader("Change your password"); - print " - + print "Content-type: text/html + +Change your password + -Please enter the new password for $::COOKIE{'Bugzilla_login'}: - +Please enter the new password for $::COOKIE{'Bugzilla_login'}: + -Re-enter your new password: - +Re-enter your new password: + -\n"; +\n"; exit; } @@ -85,4 +85,4 @@ SendSQL("update logincookies set cryptpassword = '$encrypted' where cookie = $:: print "OK, done. Your new password has been set. -Back to query page.\n"; +Back to query page.\n"; diff --git a/colchange.cgi b/colchange.cgi index 32fe1bb43..bd3b23d6f 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -24,6 +24,8 @@ use strict; require "CGI.pl"; +print "Content-type: text/html\n"; + # The master list not only says what fields are possible, but what order # they get displayed in. @@ -47,8 +49,8 @@ if (defined $::FORM{'rememberedquery'}) { my $list = join(" ", @collist); print "Set-Cookie: COLUMNLIST=$list ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n"; - print "Content-type: text/html\n\n"; - PutHeader("What a hack"); + print "\n"; + print "What a hack.\n"; print "Resubmitting your query with new columns...\n"; exit; } @@ -59,9 +61,6 @@ if (defined $::COOKIE{'COLUMNLIST'}) { @collist = @::default_column_list; } -print "Content-type: text/html\n\n"; - -PutHeader("Column Change"); my %desc; foreach my $i (@masterlist) { @@ -72,11 +71,12 @@ $desc{'summary'} = "Summary (first 60 characters)"; $desc{'summaryfull'} = "Full Summary"; +print "\n"; print "Check which columns you wish to appear on the list, and then click\n"; print "on submit.\n"; print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; foreach my $i (@masterlist) { my $c; @@ -85,13 +85,13 @@ foreach my $i (@masterlist) { } else { $c = ''; } - print "$desc{$i}\n"; + print "$desc{$i}\n"; } print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; print "\n"; print "\n"; diff --git a/doeditowners.cgi b/doeditowners.cgi index 88bfdeb65..b09d7298b 100755 --- a/doeditowners.cgi +++ b/doeditowners.cgi @@ -68,5 +68,5 @@ foreach my $update (@updates) { } print "OK, done.\n"; -print "Edit the owners some more.\n\n"; -print "Go back to the query page.\n"; +print "Edit the owners some more.\n"; +print "Go back to the query page.\n"; diff --git a/doeditparams.cgi b/doeditparams.cgi index 514fdbd7d..e43fd73ce 100755 --- a/doeditparams.cgi +++ b/doeditparams.cgi @@ -70,6 +70,6 @@ foreach my $i (@::param_list) { WriteParams(); print "OK, done.\n"; -print "Edit the params some more.\n\n"; -print "Go back to the query page.\n"; +print "Edit the params some more.\n"; +print "Go back to the query page.\n"; diff --git a/editowners.cgi b/editowners.cgi index 647bdeda0..1bfb6ac13 100755 --- a/editowners.cgi +++ b/editowners.cgi @@ -44,9 +44,9 @@ PutHeader("Edit Component Owners"); print "This lets you edit the owners of the program components of bugzilla.\n"; -print "\n\n"; +print "\n"; -my $rowbreak = ""; +my $rowbreak = ""; SendSQL("select program, value, initialowner from components order by program, value"); @@ -56,17 +56,17 @@ my $curProgram = ""; while (@line = FetchSQLData()) { if ($line[0] ne $curProgram) { print $rowbreak; - print "$line[0]:\n"; + print "$line[0]:\n"; $curProgram = $line[0]; } - print "$line[1]$line[1]\n"; } print "\n"; -print "\n"; +print "\n"; print "\n"; -print "Skip all this, and go back to the query page\n"; +print "Skip all this, and go back to the query page\n"; diff --git a/editparams.cgi b/editparams.cgi index b00071956..f926c0ae9 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -49,23 +49,23 @@ print "Be careful!\n"; print "\n"; print "Any item you check Reset on will get reset to its default value.\n"; -print "\n\n"; +print "\n"; -my $rowbreak = ""; +my $rowbreak = ""; print $rowbreak; foreach my $i (@::param_list) { - print "$i:$::param_desc{$i}\n"; - print "Reset\n"; + print "$i:$::param_desc{$i}\n"; + print "Reset\n"; my $value = Param($i); SWITCH: for ($::param_type{$i}) { /^t$/ && do { - print "\n'; last SWITCH; }; /^l$/ && do { - print "" . + print "" . value_quote($value) . "\n"; last SWITCH; }; @@ -79,18 +79,18 @@ foreach my $i (@::param_list) { $on = ""; $off = "checked"; } - print "On\n"; - print "Off\n"; + print "On\n"; + print "Off\n"; last SWITCH; }; # DEFAULT - print "Unknown param type $::param_type{$i}!!!\n"; + print "Unknown param type $::param_type{$i}!!!\n"; } print "\n"; print $rowbreak; } -print "version: +print "version: What version of Bugzilla this is. This can't be modified here, but %version% can be used as a parameter in places that understand such parameters @@ -98,9 +98,9 @@ such parameters print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print "\n"; -print "Skip all this, and go back to the query page\n"; +print "Skip all this, and go back to the query page\n"; diff --git a/enter_bug.cgi b/enter_bug.cgi index 893a992da..529c394b8 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -43,9 +43,9 @@ if (!defined $::FORM{'product'}) { print "a bug.\n"; print ""; foreach my $p (sort (@prodlist)) { - print "$p:\n"; + print "$p:\n"; if (defined $::proddesc{$p}) { - print "$::proddesc{$p}\n"; + print "$::proddesc{$p}\n"; } print ""; } @@ -55,7 +55,7 @@ if (!defined $::FORM{'product'}) { $::FORM{'product'} = $prodlist[0]; } -my $product = url_decode($::FORM{'product'}); +my $product = $::FORM{'product'}; confirm_login(); @@ -149,7 +149,7 @@ GetVersionTable(); my $assign_element = GeneratePersonInput('assigned_to', 1, formvalue('assigned_to')); -my $cc_element = GeneratePeopleInput('cc', 45, formvalue('cc')); +my $cc_element = GeneratePeopleInput('cc', formvalue('cc')); my $priority_popup = make_popup('priority', \@::legal_priority, diff --git a/post_bug.cgi b/post_bug.cgi index 52885a535..3ea3b070f 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -18,7 +18,6 @@ # Netscape Communications Corporation. All Rights Reserved. # # Contributor(s): Terry Weissman -# Andrew Anderson use diagnostics; @@ -35,19 +34,17 @@ $zz = $zz . $zz; confirm_login(); -my $platform = url_quote($::FORM{'product'}); -my $version = url_quote($::FORM{'version'}); - -print "Set-Cookie: PLATFORM=$platform ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; -print "Set-Cookie: VERSION-$platform=$version ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; +print "Set-Cookie: PLATFORM=$::FORM{'product'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; +print "Set-Cookie: VERSION-$::FORM{'product'}=$::FORM{'version'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; print "Content-type: text/html\n\n"; if (defined $::FORM{'maketemplate'}) { - PutHeader("Bookmarks are your friend.", "Template constructed."); + print "Bookmarks are your friend.\n"; + print "Template constructed.\n"; my $url = "enter_bug.cgi?$::buffer"; - print "If you put a bookmark to this link, it will\n"; + print "If you put a bookmark to this link, it will\n"; print "bring up the submit-a-new-bug page with the fields initialized\n"; print "as you've requested.\n"; exit; @@ -121,8 +118,6 @@ foreach my $person (keys %ccids) { print "Changes Submitted\n"; print "Show BUG# $id\n"; print "Back To Query Page\n"; -print "Enter a new bug\n"; - system("./processmail $id < /dev/null > /dev/null 2> /dev/null &"); exit; diff --git a/process_bug.cgi b/process_bug.cgi index 84750e0e6..6755ce91c 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -37,14 +37,11 @@ print "Content-type: text/html\n\n"; GetVersionTable(); if ($::FORM{'product'} ne $::dontchange) { - my $prod = url_decode($::FORM{'product'}); - my $version = url_decode($::FORM{'version'}); - my $component = url_decode($::FORM{'component'}); - my $vok = lsearch($::versions{$prod}, $version) >= 0; - my $cok = lsearch($::components{$prod}, $component) >= 0; + my $prod = $::FORM{'product'}; + my $vok = lsearch($::versions{$prod}, $::FORM{'version'}) >= 0; + my $cok = lsearch($::components{$prod}, $::FORM{'component'}) >= 0; if (!$vok || !$cok) { print "Changing product means changing version and component.\n"; - print "You have chosen a new product, and now the version and/or\n"; print "component fields are not correct. (Or, possibly, the bug did\n"; print "not have a valid component or version field in the first place.)\n"; @@ -52,26 +49,26 @@ if ($::FORM{'product'} ne $::dontchange) { print "\n"; print "\n"; print "\n"; - print "Product:\n"; + print "Product:\n"; print "$prod\n"; print "\n"; - print "Version:\n"; - print "" . Version_element($version, $prod) . "\n"; + print "Version:\n"; + print "" . Version_element($::FORM{'version'}, $prod) . "\n"; print "\n"; - print "Component:\n"; - print "" . Component_element($component, $prod) . "\n"; + print "Component:\n"; + print "" . Component_element($::FORM{'component'}, $prod) . "\n"; print "\n"; print "\n"; foreach my $i (keys %::FORM) { if ($i ne 'version' && $i ne 'component') { - print "\n"; } } - print "\n"; + print "\n"; print "\n"; print "\n"; - print "Cancel all this and go back to the query page.\n"; + print "Cancel all this and go back to the query page.\n"; exit; } } @@ -92,6 +89,11 @@ if (!defined $::FORM{'who'}) { $::FORM{'who'} = $::COOKIE{'Bugzilla_login'}; } +print "Update Bug " . join(" ", @idlist) . "\n"; +if (defined $::FORM{'id'}) { + navigation_header(); +} +print "\n"; $::query = "update bugs\nset"; $::comma = ""; umask(0); @@ -117,7 +119,6 @@ sub ChangeResolution { } } -ConnectToDatabase(); foreach my $field ("rep_platform", "priority", "bug_severity", "url", "summary", "component", "bug_file_loc", "short_desc", @@ -125,11 +126,15 @@ foreach my $field ("rep_platform", "priority", "bug_severity", "url", if (defined $::FORM{$field}) { if ($::FORM{$field} ne $::dontchange) { DoComma(); - $::query .= "$field = " . SqlQuote(url_decode($::FORM{$field})); + $::query .= "$field = " . SqlQuote($::FORM{$field}); } } } + + +ConnectToDatabase(); + SWITCH: for ($::FORM{'knob'}) { /^none$/ && do { last SWITCH; @@ -162,8 +167,8 @@ SWITCH: for ($::FORM{'knob'}) { } ChangeStatus('NEW'); SendSQL("select initialowner from components where program=" . - SqlQuote(url_decode($::FORM{'product'})) . " and value=" . - SqlQuote(url_decode($::FORM{'component'}))); + SqlQuote($::FORM{'product'}) . " and value=" . + SqlQuote($::FORM{'component'})); my $newname = FetchOneColumn(); my $newid = DBNameToIdAndCheck($newname, 1); DoComma(); @@ -172,7 +177,6 @@ SWITCH: for ($::FORM{'knob'}) { }; /^reopen$/ && do { ChangeStatus('REOPENED'); - ChangeResolution(''); last SWITCH; }; /^verify$/ && do { @@ -193,8 +197,7 @@ SWITCH: for ($::FORM{'knob'}) { exit; } if ($::FORM{'dup_id'} == $::FORM{'id'}) { - PutHeader("Nice try."); - print "But it doesn't really make sense to mark a\n"; + print "Nice try. But it doesn't really make sense to mark a\n"; print "bug as a duplicate of itself, does it?\n"; exit; } @@ -210,7 +213,6 @@ SWITCH: for ($::FORM{'knob'}) { if ($#idlist < 0) { - PutHeader("Nothing to modify"); print "You apparently didn't choose any bugs to modify.\n"; print "Click Back and try again.\n"; exit; @@ -229,7 +231,7 @@ my $basequery = $::query; sub SnapShotBug { my ($id) = (@_); SendSQL("select " . join(',', @::log_columns) . - " from bugs where bug_id = '" . $id . "'"); + " from bugs where bug_id = $id"); return FetchSQLData(); } @@ -238,7 +240,7 @@ foreach my $id (@idlist) { SendSQL("lock tables bugs write, bugs_activity write, cc write, profiles write"); my @oldvalues = SnapShotBug($id); - my $query = "$basequery\nwhere bug_id = '" . $id . "'"; + my $query = "$basequery\nwhere bug_id = $id"; # print "$query\n"; @@ -259,7 +261,7 @@ foreach my $id (@idlist) { } } - SendSQL("delete from cc where bug_id = '" . $id . "'"); + SendSQL("delete from cc where bug_id = $id"); foreach my $ccid (keys %ccids) { SendSQL("insert into cc (bug_id, who) values ($id, $ccid)"); } @@ -274,8 +276,7 @@ foreach my $id (@idlist) { if ($old ne $new) { if (!defined $whoid) { $whoid = DBNameToIdAndCheck($::FORM{'who'}); - $query = "select delta_ts from bugs where bug_id = '" . $id . "'"; - SendSQL($query); + SendSQL("select delta_ts from bugs where bug_id = $id"); $timestamp = FetchOneColumn(); } if ($col eq 'assigned_to') { @@ -286,21 +287,13 @@ foreach my $id (@idlist) { $old = SqlQuote($old); $new = SqlQuote($new); my $q = "insert into bugs_activity (bug_id,who,when,field,oldvalue,newvalue) values ($id,$whoid,$timestamp,$col,$old,$new)"; - # print "$q"; + # puts "$q" SendSQL($q); } } - - PutHeader("Changes submitted for bug $::FORM{'id'}", - "Changes Submitted", $::FORM{'id'}); - if (defined $::FORM{'id'}) { - navigation_header(); - } - print "\n\n"; - print "Back To BUG# $id\n"; - print "Back To Query Page\n"; - print "Enter a new bug\n"; + print "Changes Submitted\n"; + print "Back To BUG# $id\n"; SendSQL("unlock tables"); diff --git a/query.cgi b/query.cgi index ccac365de..b24dee0f3 100755 --- a/query.cgi +++ b/query.cgi @@ -99,8 +99,8 @@ print "Set-Cookie: BUGLIST= Content-type: text/html\n\n"; GetVersionTable(); -my $who = GeneratePeopleInput("assigned_to", 45, $default{"assigned_to"}); -my $reporter = GeneratePeopleInput("reporter", 45, $default{"reporter"}); +my $who = GeneratePeopleInput("assigned_to", $default{"assigned_to"}); +my $reporter = GeneratePeopleInput("reporter", $default{"reporter"}); # Muck the "legal product" list so that the default one is always first (and @@ -118,102 +118,97 @@ PutHeader("Bugzilla Query Page", "Query Page"); push @::legal_resolution, "---"; # Oy, what a hack. print " - + -Status: -Resolution: -Platform: -Priority: -Severity: +Status: +Resolution: +Platform: +Priority: +Severity: - - + + @{[make_options(\@::legal_bug_status, $default{'bug_status'}, $type{'bug_status'})]} - + - - + + @{[make_options(\@::legal_resolution, $default{'resolution'}, $type{'resolution'})]} - + - - + + @{[make_options(\@::legal_platform, $default{'rep_platform'}, $type{'rep_platform'})]} - + - - + + @{[make_options(\@::legal_priority, $default{'priority'}, $type{'priority'})]} - + - - + + @{[make_options(\@::legal_severity, $default{'bug_severity'}, $type{'bug_severity'})]} - + - - - Assigned To: - $who +Assigned To:$who + - - - Reporter: - $reporter +Reporter:$reporter -Changed in the last days. +Changed in the last days. -Program: -Version: -Component: +Program: +Version: +Component: - - -@{[make_options(\@::legal_product, url_decode($default{'product'}), $type{'product'})]} - + + +@{[make_options(\@::legal_product, $default{'product'}, $type{'product'})]} + - - + + @{[make_options(\@::legal_versions, $default{'version'}, $type{'version'})]} - + - - + + @{[make_options(\@::legal_components, $default{'component'}, $type{'component'})]} - + - + -Summary: - -Substring -Regexp +Summary: + +Substring +Regexp -Description: - -Substring -Regexp +Description: + +Substring +Regexp @@ -221,27 +216,27 @@ print " - Run this query + Run this query "; if ($namelist ne "") { print " - - Load the remembered query: -$namelist + + Load the remembered query: +$namelist - Run the remembered query: + Run the remembered query: - Forget the remembered query: + Forget the remembered query: " } print " - Remember this as the default query + Remember this as the default query - Remember this query, and name it: - + Remember this query, and name it: + Sort By: @@ -252,7 +247,7 @@ print " - + Give me a clue about how to use this form. @@ -262,14 +257,14 @@ print " if (defined $::COOKIE{"Bugzilla_login"}) { if ($::COOKIE{"Bugzilla_login"} eq Param("maintainer")) { - print "Edit Bugzilla operating parameters\n"; - print "Edit Bugzilla component owners\n"; + print "Edit Bugzilla operating parameters\n"; + print "Edit Bugzilla component owners\n"; } - print "Log in as someone besides $::COOKIE{'Bugzilla_login'}\n"; + print "Log in as someone besides $::COOKIE{'Bugzilla_login'}\n"; } -print "Change your password.\n"; -print "Enter a new bug.\n"; -print "Bug reports.\n"; +print "Change your password.\n"; +print "Create a new bug.\n"; +print "Bug reports\n"; diff --git a/relogin.cgi b/relogin.cgi index 0c74319a5..5ef523945 100755 --- a/relogin.cgi +++ b/relogin.cgi @@ -30,13 +30,11 @@ Set-Cookie: Bugzilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT Content-type: text/html -"; -PutHeader("Your login has been forgotten"); -print " +Your login has been forgotten. The cookie that was remembering your login is now gone. The next time you do an action that requires a login, you will be prompted for it. -Back to the query page. +Back to the query page. "; exit; diff --git a/reports.cgi b/reports.cgi index 12ff00c7f..7456c054e 100755 --- a/reports.cgi +++ b/reports.cgi @@ -156,12 +156,11 @@ FIN sub most_doomed { my $when = localtime (time); - my $product = url_decode($::FORM{'product'}); print < -Bug Report for $product +Bug Report for $::FORM{'product'} $when FIN @@ -180,7 +179,7 @@ from bugs, versions projector where bugs.assigned_to = assign.userid and bugs.reporter = report.userid -and bugs.product='$product' +and bugs.product='$::FORM{'product'}' and ( bugs.bug_status = 'NEW' or @@ -394,13 +393,13 @@ sub header FIN } -sub show_chart { - my $when = localtime (time); - my $product = url_decode($::FORM{'product'}); +sub show_chart + { + my $when = localtime (time); - if (! is_legal_product($product)) + if (! is_legal_product ($::FORM{'product'})) { - &die_politely ("Unknown product: $product"); + &die_politely ("Unknown product: $::FORM{'product'}"); } print < "Bug Charts for $product", + "title" => "Bug Charts for $::FORM{'product'}", "x_label" => "Dates", "y_label" => "Bug Count", "legend_labels" => \@labels, @@ -477,7 +476,6 @@ FIN sub die_politely { my $msg = shift; - my $product = url_decode($::FORM{'product'}); print < @@ -486,7 +484,7 @@ sub die_politely Sorry, but ... -There is no graph available for $product +There is no graph available for $::FORM{'product'} $msg diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 102e017b7..814a1f031 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -18,7 +18,6 @@ # Netscape Communications Corporation. All Rights Reserved. # # Contributor(s): Terry Weissman -# Andrew Anderson use diagnostics; use strict; @@ -43,7 +42,7 @@ sub Alert { sub BugLink { my ($id) = (@_); - return "$id"; + return "$id"; } diff --git a/show_bug.cgi b/show_bug.cgi index 06e02da2b..98829e356 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -22,19 +22,16 @@ use diagnostics; use strict; -use vars @::FORM; +print "Content-type: text/html\n"; +print "\n"; require "CGI.pl"; -confirm_login(); - -print "Content-type: text/html\n\n"; - -if (!defined $::FORM{'id'} || $::FORM{'id'} eq "") { - PutHeader("Search By Bug Number", "Search By Bug Number", ""); - print "\n"; +if (!defined $::FORM{'id'}) { + print "Search By Bug Number\n"; + print "\n"; print "You may find a single bug by entering its bug id here: \n"; - print "\n"; + print "\n"; print "\n"; print "\n"; exit; -- cgit v1.2.3-24-g4f1b
-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 " + +
-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 " + +
@@ -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 " + +
-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 "
- + To make changes to a bunch of bugs at once: 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.) Click the below \"Commit\" button. - +
-Back to query page.\n"; +Back to query page.\n"; diff --git a/colchange.cgi b/colchange.cgi index 32fe1bb43..bd3b23d6f 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -24,6 +24,8 @@ use strict; require "CGI.pl"; +print "Content-type: text/html\n"; + # The master list not only says what fields are possible, but what order # they get displayed in. @@ -47,8 +49,8 @@ if (defined $::FORM{'rememberedquery'}) { my $list = join(" ", @collist); print "Set-Cookie: COLUMNLIST=$list ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n"; - print "Content-type: text/html\n\n"; - PutHeader("What a hack"); + print "\n"; + print "
\n"; -print "
\n"; print "\n"; print "
\n"; -print "Edit the owners some more.\n
\n"; -print "Go back to the query page.\n"; +print "Edit the owners some more.
\n"; +print "Go back to the query page.\n"; diff --git a/doeditparams.cgi b/doeditparams.cgi index 514fdbd7d..e43fd73ce 100755 --- a/doeditparams.cgi +++ b/doeditparams.cgi @@ -70,6 +70,6 @@ foreach my $i (@::param_list) { WriteParams(); print "OK, done.
\n"; -print "Edit the params some more.\n
\n"; -print "Go back to the query page.\n"; +print "Edit the params some more.
\n"; +print "Go back to the query page.\n"; diff --git a/editowners.cgi b/editowners.cgi index 647bdeda0..1bfb6ac13 100755 --- a/editowners.cgi +++ b/editowners.cgi @@ -44,9 +44,9 @@ PutHeader("Edit Component Owners"); print "This lets you edit the owners of the program components of bugzilla.\n"; -print "
Skip all this, and go back to the query page\n"; +print "
Skip all this, and go back to the query page\n"; diff --git a/editparams.cgi b/editparams.cgi index b00071956..f926c0ae9 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -49,23 +49,23 @@ print "Be careful!\n"; print "
\n"; print "Any item you check Reset on will get reset to its default value.\n"; -print "
Skip all this, and go back to the query page\n"; diff --git a/enter_bug.cgi b/enter_bug.cgi index 893a992da..529c394b8 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -43,9 +43,9 @@ if (!defined $::FORM{'product'}) { print "a bug.\n"; print "
Click Back and try again.\n"; exit; @@ -229,7 +231,7 @@ my $basequery = $::query; sub SnapShotBug { my ($id) = (@_); SendSQL("select " . join(',', @::log_columns) . - " from bugs where bug_id = '" . $id . "'"); + " from bugs where bug_id = $id"); return FetchSQLData(); } @@ -238,7 +240,7 @@ foreach my $id (@idlist) { SendSQL("lock tables bugs write, bugs_activity write, cc write, profiles write"); my @oldvalues = SnapShotBug($id); - my $query = "$basequery\nwhere bug_id = '" . $id . "'"; + my $query = "$basequery\nwhere bug_id = $id"; # print "
$query
$q
\n"; - print "Back To BUG# $id\n"; - print "Back To Query Page\n"; - print "Enter a new bug\n"; + print "
+
-
@@ -221,27 +216,27 @@ print " - Run this query + Run this query "; if ($namelist ne "") { print " -
-Back to the query page. +Back to the query page. "; exit; diff --git a/reports.cgi b/reports.cgi index 12ff00c7f..7456c054e 100755 --- a/reports.cgi +++ b/reports.cgi @@ -156,12 +156,11 @@ FIN sub most_doomed { my $when = localtime (time); - my $product = url_decode($::FORM{'product'}); print < -Bug Report for $product +Bug Report for $::FORM{'product'} $when FIN @@ -180,7 +179,7 @@ from bugs, versions projector where bugs.assigned_to = assign.userid and bugs.reporter = report.userid -and bugs.product='$product' +and bugs.product='$::FORM{'product'}' and ( bugs.bug_status = 'NEW' or @@ -394,13 +393,13 @@ sub header FIN } -sub show_chart { - my $when = localtime (time); - my $product = url_decode($::FORM{'product'}); +sub show_chart + { + my $when = localtime (time); - if (! is_legal_product($product)) + if (! is_legal_product ($::FORM{'product'})) { - &die_politely ("Unknown product: $product"); + &die_politely ("Unknown product: $::FORM{'product'}"); } print < "Bug Charts for $product", + "title" => "Bug Charts for $::FORM{'product'}", "x_label" => "Dates", "y_label" => "Bug Count", "legend_labels" => \@labels, @@ -477,7 +476,6 @@ FIN sub die_politely { my $msg = shift; - my $product = url_decode($::FORM{'product'}); print < @@ -486,7 +484,7 @@ sub die_politely Sorry, but ... -There is no graph available for $product +There is no graph available for $::FORM{'product'} $msg diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 102e017b7..814a1f031 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -18,7 +18,6 @@ # Netscape Communications Corporation. All Rights Reserved. # # Contributor(s): Terry Weissman -# Andrew Anderson use diagnostics; use strict; @@ -43,7 +42,7 @@ sub Alert { sub BugLink { my ($id) = (@_); - return "$id"; + return "$id"; } diff --git a/show_bug.cgi b/show_bug.cgi index 06e02da2b..98829e356 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -22,19 +22,16 @@ use diagnostics; use strict; -use vars @::FORM; +print "Content-type: text/html\n"; +print "\n"; require "CGI.pl"; -confirm_login(); - -print "Content-type: text/html\n\n"; - -if (!defined $::FORM{'id'} || $::FORM{'id'} eq "") { - PutHeader("Search By Bug Number", "Search By Bug Number", ""); - print "\n"; +if (!defined $::FORM{'id'}) { + print "Search By Bug Number\n"; + print "\n"; print "You may find a single bug by entering its bug id here: \n"; - print "\n"; + print "\n"; print "\n"; print "\n"; exit; -- cgit v1.2.3-24-g4f1b
FIN @@ -180,7 +179,7 @@ from bugs, versions projector where bugs.assigned_to = assign.userid and bugs.reporter = report.userid -and bugs.product='$product' +and bugs.product='$::FORM{'product'}' and ( bugs.bug_status = 'NEW' or @@ -394,13 +393,13 @@ sub header FIN } -sub show_chart { - my $when = localtime (time); - my $product = url_decode($::FORM{'product'}); +sub show_chart + { + my $when = localtime (time); - if (! is_legal_product($product)) + if (! is_legal_product ($::FORM{'product'})) { - &die_politely ("Unknown product: $product"); + &die_politely ("Unknown product: $::FORM{'product'}"); } print < "Bug Charts for $product", + "title" => "Bug Charts for $::FORM{'product'}", "x_label" => "Dates", "y_label" => "Bug Count", "legend_labels" => \@labels, @@ -477,7 +476,6 @@ FIN sub die_politely { my $msg = shift; - my $product = url_decode($::FORM{'product'}); print < @@ -486,7 +484,7 @@ sub die_politely Sorry, but ... -There is no graph available for $product +There is no graph available for $::FORM{'product'} $msg diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 102e017b7..814a1f031 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -18,7 +18,6 @@ # Netscape Communications Corporation. All Rights Reserved. # # Contributor(s): Terry Weissman -# Andrew Anderson use diagnostics; use strict; @@ -43,7 +42,7 @@ sub Alert { sub BugLink { my ($id) = (@_); - return "$id"; + return "$id"; } diff --git a/show_bug.cgi b/show_bug.cgi index 06e02da2b..98829e356 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -22,19 +22,16 @@ use diagnostics; use strict; -use vars @::FORM; +print "Content-type: text/html\n"; +print "\n"; require "CGI.pl"; -confirm_login(); - -print "Content-type: text/html\n\n"; - -if (!defined $::FORM{'id'} || $::FORM{'id'} eq "") { - PutHeader("Search By Bug Number", "Search By Bug Number", ""); - print "\n"; +if (!defined $::FORM{'id'}) { + print "Search By Bug Number\n"; + print "\n"; print "You may find a single bug by entering its bug id here: \n"; - print "\n"; + print "\n"; print "\n"; print "\n"; exit; -- cgit v1.2.3-24-g4f1b
-There is no graph available for $product
+There is no graph available for $::FORM{'product'}
$msg diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 102e017b7..814a1f031 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -18,7 +18,6 @@ # Netscape Communications Corporation. All Rights Reserved. # # Contributor(s): Terry Weissman -# Andrew Anderson use diagnostics; use strict; @@ -43,7 +42,7 @@ sub Alert { sub BugLink { my ($id) = (@_); - return "$id"; + return "$id"; } diff --git a/show_bug.cgi b/show_bug.cgi index 06e02da2b..98829e356 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -22,19 +22,16 @@ use diagnostics; use strict; -use vars @::FORM; +print "Content-type: text/html\n"; +print "\n"; require "CGI.pl"; -confirm_login(); - -print "Content-type: text/html\n\n"; - -if (!defined $::FORM{'id'} || $::FORM{'id'} eq "") { - PutHeader("Search By Bug Number", "Search By Bug Number", ""); - print "\n"; +if (!defined $::FORM{'id'}) { + print "Search By Bug Number\n"; + print "\n"; print "You may find a single bug by entering its bug id here: \n"; - print "\n"; + print "\n"; print "\n"; print "\n"; exit; -- cgit v1.2.3-24-g4f1b