]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 342410: Various modules assume functions are in global scope, when none are
authormkanat%bugzilla.org <>
Mon, 26 Jun 2006 17:06:47 +0000 (17:06 +0000)
committermkanat%bugzilla.org <>
Mon, 26 Jun 2006 17:06:47 +0000 (17:06 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave

Bugzilla/Chart.pm
Bugzilla/User.pm

index c878186bc798452e4ac7fd455c1b3802d34b9ea1..b2db9da3005c6b033b80cc24604ae70f03e52733 100644 (file)
@@ -32,6 +32,7 @@ use lib ".";
 # the same points.
 package Bugzilla::Chart;
 
+use Bugzilla::Error;
 use Bugzilla::Util;
 use Bugzilla::Series;
 
@@ -75,7 +76,7 @@ sub init {
         if ($param =~ /^line(\d+)$/) {
             foreach my $series_id ($cgi->param($param)) {
                 detaint_natural($series_id) 
-                                     || &::ThrowCodeError("invalid_series_id");
+                                     || ThrowCodeError("invalid_series_id");
                 my $series = new Bugzilla::Series($series_id);
                 push(@{$self->{'lines'}[$1]}, $series) if $series;
             }
@@ -101,7 +102,7 @@ sub init {
     foreach my $date ('datefrom', 'dateto') {
         if ($self->{$date}) {
             $self->{$date} = str2time($self->{$date}) 
-              || &::ThrowUserError("illegal_date", { date => $self->{$date}});
+              || ThrowUserError("illegal_date", { date => $self->{$date}});
         }
     }
 
@@ -109,7 +110,7 @@ sub init {
     if ($self->{'datefrom'} && $self->{'dateto'} && 
         $self->{'datefrom'} > $self->{'dateto'}) 
     {
-          &::ThrowUserError("misarranged_dates", 
+          ThrowUserError("misarranged_dates", 
                                          {'datefrom' => $cgi->param('datefrom'),
                                           'dateto' => $cgi->param('dateto')});
     }    
index c26f64332f5f94d1d950ef75662d3da63c7650c2..7ad1593ce5dd573e00790cbe052179857065bbad 100644 (file)
@@ -1007,8 +1007,8 @@ sub match_field {
         }
 
         my $limit = 0;
-        if (&::Param('maxusermatches')) {
-            $limit = &::Param('maxusermatches') + 1;
+        if (Param('maxusermatches')) {
+            $limit = Param('maxusermatches') + 1;
         }
 
         for my $query (@queries) {
@@ -1039,16 +1039,16 @@ sub match_field {
                 $cgi->append(-name=>$field,
                              -values=>[@{$users}[0]->{'login'}]);
 
-                $need_confirm = 1 if &::Param('confirmuniqueusermatch');
+                $need_confirm = 1 if Param('confirmuniqueusermatch');
 
             }
             elsif ((scalar(@{$users}) > 1)
-                    && (&::Param('maxusermatches') != 1)) {
+                    && (Param('maxusermatches') != 1)) {
                 $need_confirm = 1;
                 $match_multiple = 1;
 
-                if ((&::Param('maxusermatches'))
-                   && (scalar(@{$users}) > &::Param('maxusermatches')))
+                if ((Param('maxusermatches'))
+                   && (scalar(@{$users}) > Param('maxusermatches')))
                 {
                     $matches->{$field}->{$query}->{'status'} = 'trunc';
                     pop @{$users};  # take the last one out
@@ -1265,7 +1265,7 @@ sub get_userlist {
 
     my $dbh = Bugzilla->dbh;
     my $query  = "SELECT DISTINCT login_name, realname,";
-    if (&::Param('usevisibilitygroups')) {
+    if (Param('usevisibilitygroups')) {
         $query .= " COUNT(group_id) ";
     } else {
         $query .= " 1 ";