]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 342053: Quicksearch.pm defines $cgi outside routines - Patch by Frédéric Buclin...
authorlpsolit%gmail.com <>
Tue, 20 Jun 2006 03:00:41 +0000 (03:00 +0000)
committerlpsolit%gmail.com <>
Tue, 20 Jun 2006 03:00:41 +0000 (03:00 +0000)
Bugzilla/Search/Quicksearch.pm

index 42eae2631eec1d37a294eda38e66c06005c1db33..69eaf8dcca460c40278f2812d84c22a7bdbafbfb 100644 (file)
@@ -32,8 +32,6 @@ use Bugzilla::Bug;
 use base qw(Exporter);
 @Bugzilla::Search::Quicksearch::EXPORT = qw(quicksearch);
 
-my $cgi = Bugzilla->cgi;
-
 # Word renamings
 my %mappings = (# Status, Resolution, Platform, OS, Priority, Severity
                 "status" => "bug_status",
@@ -105,6 +103,7 @@ my $or = 0;
 
 sub quicksearch {
     my ($searchstring) = (@_);
+    my $cgi = Bugzilla->cgi;
 
     # Remove leading and trailing commas and whitespace.
     $searchstring =~ s/(^[\s,]+|[\s,]+$)//g;
@@ -493,6 +492,7 @@ sub addChart {
 sub makeChart {
     my ($expr, $field, $type, $value) = @_;
 
+    my $cgi = Bugzilla->cgi;
     $cgi->param("field$expr", $field);
     $cgi->param("type$expr",  $type);
     $cgi->param("value$expr", $value);