diff options
author | bbaetz%acm.org <> | 2003-04-02 22:35:00 +0200 |
---|---|---|
committer | bbaetz%acm.org <> | 2003-04-02 22:35:00 +0200 |
commit | b259c4b4252cde8e7926690f6ba419d2ee7c59fc (patch) | |
tree | ae51804f9db83c0b1a49f79b9e0a1848cdd5e7c7 /Bugzilla/Search.pm | |
parent | 747eb2ddd7febfa0e33ccf3797bf48db0defafcc (diff) | |
download | bugzilla-b259c4b4252cde8e7926690f6ba419d2ee7c59fc.tar.gz bugzilla-b259c4b4252cde8e7926690f6ba419d2ee7c59fc.tar.xz |
Bug 199813 - Make all users of ThrowUserError pass $vars in explicitly.
r=gerv
a=justdave
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r-- | Bugzilla/Search.pm | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index ead9156ee..1637671f0 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -103,8 +103,8 @@ sub init { my $c = trim($params->param('votes')); if ($c ne "") { if ($c !~ /^[0-9]*$/) { - $::vars->{'value'} = $c; - &::ThrowUserError("illegal_at_least_x_votes"); + &::ThrowUserError("illegal_at_least_x_votes", + { value => $c }); } push(@specialchart, ["votes", "greaterthan", $c - 1]); } @@ -207,8 +207,8 @@ sub init { if (@clist) { push(@specialchart, \@clist); } else { - $::vars->{'email'} = $email; - &::ThrowUserError("missing_email_type"); + ThrowUserError("missing_email_type", + { email => $email }); } } @@ -217,8 +217,8 @@ sub init { my $c = trim($params->param('changedin')); if ($c ne "") { if ($c !~ /^[0-9]*$/) { - $::vars->{'value'} = $c; - &::ThrowUserError("illegal_changed_in_last_x_days"); + &::ThrowUserError("illegal_changed_in_last_x_days", + { value => $c }); } push(@specialchart, ["changedin", "lessthan", $c + 1]); @@ -558,8 +558,8 @@ sub init { push(@list, "$table.keywordid = $id"); } else { - $::vars->{'keyword'} = $v; - &::ThrowUserError("unknown_keyword"); + ThrowUserError("unknown_keyword", + { keyword => $v }); } } my $haveawordterm; @@ -992,8 +992,7 @@ sub SqlifyDate { } my $date = str2time($str); if (!defined($date)) { - $::vars->{'date'} = $str; - &::ThrowUserError("illegal_date"); + &::ThrowUserError("illegal_date", { date => $str }); } return time2str("%Y-%m-%d %H:%M:%S", $date); } |