]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 102032: Fix tinderbox test errors and warnings. Patch to make new_comment...
authorzach%zachlipton.com <>
Fri, 5 Oct 2001 09:16:34 +0000 (09:16 +0000)
committerzach%zachlipton.com <>
Fri, 5 Oct 2001 09:16:34 +0000 (09:16 +0000)
100%!

Patch by Jake <jake@acutex.net>, r=justdave, no 2nd review needed.

new_comment.cgi

index 0d5ab1394f1d9e8530168210e620562dd0378ec9..ad014514db694bcf2ad76f5aeabcd4d908845cd9 100755 (executable)
 #
 # Contributor(s): Terry Weissman <terry@mozilla.org>
 
+use strict;
+
+my %FORM;
+my $buffer = "";
 if ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'}; }
 else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
 # Split the name-value pairs
-@pairs = split(/&/, $buffer);
-foreach $pair (@pairs)
+my @pairs = split(/&/, $buffer);
+foreach my $pair (@pairs)
 {
-    ($name, $value) = split(/=/, $pair);
+    my ($name, $value) = split(/=/, $pair);
 
     $value =~ tr/+/ /;
     $value =~ s/^(\s*)//s;
@@ -34,7 +38,7 @@ foreach $pair (@pairs)
     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
     $FORM{$name} = $value;
 }
-$c=$FORM{"comment"};
+my $c = $FORM{"comment"};
 if ( (!defined $c) || ($c eq '') ) {
     print "Content-type: text/html\n\n";
     print "<TITLE>Nothing on your mind?</TITLE>";