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 /post_bug.cgi | |
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 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 670920d43..37a43afb4 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -78,8 +78,8 @@ ValidateComment($comment); my $product = $::FORM{'product'}; my $product_id = get_product_id($product); if (!$product_id) { - $vars->{'product'} = $product; - ThrowUserError("invalid_product_name"); + ThrowUserError("invalid_product_name", + { product => $product }); } # Set cookies @@ -230,8 +230,8 @@ if ($::FORM{'keywords'} && UserInGroup("editbugs")) { } my $i = GetKeywordIdFromName($keyword); if (!$i) { - $vars->{'keyword'} = $keyword; - ThrowUserError("unknown_keyword"); + ThrowUserError("unknown_keyword", + { keyword => $keyword }); } if (!$keywordseen{$i}) { push(@keywordlist, $i); @@ -301,8 +301,10 @@ if (UserInGroup("editbugs") && defined($::FORM{'dependson'})) { foreach my $i (@isect) { $both = $both . GetBugLink($i, "#" . $i) . " "; } - $vars->{'both'} = $both; - ThrowUserError("dependency_loop_multi", undef, "abort"); + + ThrowUserError("dependency_loop_multi", + { both => $both }, + "abort"); } } my $tmp = $me; @@ -337,8 +339,8 @@ if (UserInGroup(Param("timetrackinggroup")) && if ($est_time =~ /^(?:\d+(?:\.\d*)?|\.\d+)$/) { $sql .= SqlQuote($est_time) . "," . SqlQuote($est_time); } else { - $vars->{'field'} = "estimated_time"; - ThrowUserError("need_positive_number"); + ThrowUserError("need_positive_number", + { field => 'estimated_time' }); } } else { $sql .= "0, 0"; |