aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-04-02 20:35:00 +0000
committerbbaetz%acm.org <>2003-04-02 20:35:00 +0000
commitb259c4b4252cde8e7926690f6ba419d2ee7c59fc (patch)
treeae51804f9db83c0b1a49f79b9e0a1848cdd5e7c7 /duplicates.cgi
parentBug 195424 - Add a note about new MySQL permissions needed for Bugzilla in My... (diff)
downloadbugzilla-b259c4b4252cde8e7926690f6ba419d2ee7c59fc.tar.gz
bugzilla-b259c4b4252cde8e7926690f6ba419d2ee7c59fc.tar.bz2
bugzilla-b259c4b4252cde8e7926690f6ba419d2ee7c59fc.zip
Bug 199813 - Make all users of ThrowUserError pass $vars in explicitly.
r=gerv a=justdave
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-xduplicates.cgi23
1 files changed, 12 insertions, 11 deletions
diff --git a/duplicates.cgi b/duplicates.cgi
index a9a3031f3..1a3c08a9f 100755
--- a/duplicates.cgi
+++ b/duplicates.cgi
@@ -83,8 +83,8 @@ my $product_id;
if ($product) {
$product_id = get_product_id($product);
if (!$product_id) {
- $vars->{'product'} = $product;
- ThrowUserError("invalid_product_name");
+ ThrowUserError("invalid_product_name",
+ { product => $product });
}
}
@@ -109,17 +109,17 @@ if (!tie(%dbmcount, 'AnyDBM_File', "data/duplicates/dupes$today",
if ($!{ENOENT}) {
if (!tie(%dbmcount, 'AnyDBM_File', "data/duplicates/dupes$yesterday",
O_RDONLY, 0644)) {
- $vars->{'today'} = $today;
+ my $vars = { today => $today };
if ($!{ENOENT}) {
- ThrowUserError("no_dupe_stats");
+ ThrowUserError("no_dupe_stats", $vars);
} else {
$vars->{'error_msg'} = $!;
- ThrowUserError("no_dupe_stats_error_yesterday");
+ ThrowUserError("no_dupe_stats_error_yesterday", $vars);
}
}
} else {
- $vars->{'error_msg'} = $!;
- ThrowUserError("no_dupe_stats_error_today");
+ ThrowUserError("no_dupe_stats_error_today",
+ { error_msg => $! });
}
}
@@ -146,10 +146,11 @@ if (!tie(%before, 'AnyDBM_File', "data/duplicates/dupes$whenever",
O_RDONLY, 0644)) {
# Ignore file not found errors
if (!$!{ENOENT}) {
- $vars->{'error_msg'} = $!;
- $vars->{'changedsince'} = $changedsince;
- $vars->{'whenever'} = $whenever;
- ThrowUserError("no_dupe_stats_error_whenever");
+ ThrowUserError("no_dupe_stats_error_whenever",
+ { error_msg => $!,
+ changedsince => $changedsince,
+ whenever => $whenever,
+ });
}
} else {
# Calculate the deltas