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. --- process_bug.cgi | 69 ++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) (limited to 'process_bug.cgi') 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 "
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";
- 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 |