summaryrefslogtreecommitdiffstats
path: root/duplicates.cgi
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-08-16 07:57:10 +0200
committergerv%gerv.net <>2002-08-16 07:57:10 +0200
commitde177c6bdf5d413b4fdb860970e422fadc943669 (patch)
tree3325e6186bf8351231418817d5ec3fe8e7ca6c7b /duplicates.cgi
parent24ad858514896ad470e73abe0fa6e97a813efa4e (diff)
downloadbugzilla-de177c6bdf5d413b4fdb860970e422fadc943669.tar.gz
bugzilla-de177c6bdf5d413b4fdb860970e422fadc943669.tar.xz
Bug 162068 - Fix callers of ThrowUserError to use messages.html.tmpl. Patch by gerv; r=bbaetz.
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-xduplicates.cgi23
1 files changed, 10 insertions, 13 deletions
diff --git a/duplicates.cgi b/duplicates.cgi
index 715b4be28..2d46e0d79 100755
--- a/duplicates.cgi
+++ b/duplicates.cgi
@@ -92,21 +92,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;
if ($!{ENOENT}) {
- ThrowUserError("There are no duplicate statistics for today " .
- "($today) or yesterday.",
- "Cannot find duplicate statistics");
+ ThrowUserError("no_dupe_stats");
} else {
- ThrowUserError("There are no duplicate statistics for today " .
- "($today), and an error occurred when " .
- "accessing yesterday's dupes file: $!.",
- "Error reading yesterday's dupes file");
+ $vars->{'error_msg'} = $!;
+ ThrowUserError("no_dupe_stats_error_yesterday");
}
}
} else {
- ThrowUserError("An error occurred when accessing today ($today)'s " .
- "dupes file: $!.",
- "Error reading today's dupes file");
+ $vars->{'error_msg'} = $!;
+ ThrowUserError("no_dupe_stats_error_today");
}
}
@@ -133,9 +129,10 @@ if (!tie(%before, 'AnyDBM_File', "data/duplicates/dupes$whenever",
O_RDONLY, 0644)) {
# Ignore file not found errors
if (!$!{ENOENT}) {
- ThrowUserError("Can't open $changedsince days ago ($whenever)'s " .
- "dupes file: $!",
- "Error reading previous dupes file");
+ $vars->{'error_msg'} = $!;
+ $vars->{'changedsince'} = $changedsince;
+ $vars->{'whenever'} = $whenever;
+ ThrowUserError("no_dupe_stats_error_whenever");
}
} else {
# Calculate the deltas