summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-05-14 15:14:54 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-05-14 15:14:54 +0200
commit1f1d6a5bcd5b77e8fbb8d827a614cdc1e3323c4d (patch)
treee81070c857145057099933ebf4b1038186ef90a1
parentc42c5a57913833c61616aae4ccaaa4f000c1d811 (diff)
downloadbugzilla-1f1d6a5bcd5b77e8fbb8d827a614cdc1e3323c4d.tar.gz
bugzilla-1f1d6a5bcd5b77e8fbb8d827a614cdc1e3323c4d.tar.xz
Bug 565881: 'flag_status_invalid' and 'request_queue_group_invalid' should be user errors, not code errors
a=LpSolit
-rw-r--r--Bugzilla/Flag.pm2
-rwxr-xr-xrequest.cgi6
-rw-r--r--template/en/default/global/code-error.html.tmpl10
-rw-r--r--template/en/default/global/user-error.html.tmpl11
4 files changed, 14 insertions, 15 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index ab8961967..3dccd7a02 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -748,7 +748,7 @@ sub _check_status {
if (!grep($status eq $_ , qw(X + - ?))
|| ($status eq '?' && $self->status ne '?' && !$self->type->is_requestable))
{
- ThrowCodeError('flag_status_invalid', { id => $self->id,
+ ThrowUserError('flag_status_invalid', { id => $self->id,
status => $status });
}
return $status;
diff --git a/request.cgi b/request.cgi
index e1137b3f2..2dd12c49b 100755
--- a/request.cgi
+++ b/request.cgi
@@ -332,8 +332,7 @@ sub validateStatus {
return if !defined $status;
grep($status eq $_, qw(? +- + - all))
- || ThrowCodeError("flag_status_invalid",
- { status => $status });
+ || ThrowUserError("flag_status_invalid", { status => $status });
trick_taint($status);
return $status;
}
@@ -343,8 +342,7 @@ sub validateGroup {
return if !defined $group;
grep($group eq $_, qw(requester requestee category type))
- || ThrowCodeError("request_queue_group_invalid",
- { group => $group });
+ || ThrowUserError("request_queue_group_invalid", { group => $group });
trick_taint($group);
return $group;
}
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index 1819a4f96..70dc64ab1 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -277,13 +277,6 @@
You can't ask a specific person for
<em>[% type.name FILTER html %]</em>.
- [% ELSIF error == "flag_status_invalid" %]
- The flag status <em>[% status FILTER html %]</em>
- [% IF id %]
- for flag ID #[% id FILTER html %]
- [% END %]
- is invalid.
-
[% ELSIF error == "flag_type_inactive" %]
[% title = "Inactive Flag Type" %]
The flag type [% type FILTER html %] is inactive and cannot be used
@@ -422,9 +415,6 @@
An error occurred while preparing for a RADIUS authentication request:
<code>[% errstr FILTER html %]</code>.
- [% ELSIF error == "request_queue_group_invalid" %]
- The group field <em>[% group FILTER html %]</em> is invalid.
-
[% ELSIF error == "report_axis_invalid" %]
<em>[% val FILTER html %]</em> is not a valid value for
[%+ IF fld == "x" %]the horizontal axis
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 698eed8fb..5fdcee8f3 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -625,6 +625,14 @@
and the user you asked isn't in that group. Please choose someone else
to ask, or ask an administrator to add the user to the group.
+ [% ELSIF error == "flag_status_invalid" %]
+ [% title = "Flag Status Invalid" %]
+ The flag status <em>[% status FILTER html %]</em>
+ [% IF id %]
+ for flag ID #[% id FILTER html %]
+ [% END %]
+ is invalid.
+
[% ELSIF error == "flag_type_cc_list_invalid" %]
[% title = "Flag Type CC List Invalid" %]
[% admindocslinks = {'flags-overview.html#flags-admin' => 'Administering Flags'} %]
@@ -1457,6 +1465,9 @@
for [% terms.bug %] [%+ bug_id FILTER html %]
has a circular dependency on [% terms.bug %] [%+ dep_id FILTER html %].
+ [% ELSIF error == "request_queue_group_invalid" %]
+ The group field <em>[% group FILTER html %]</em> is invalid.
+
[% ELSIF error == "require_new_password" %]
[% title = "New Password Needed" %]
You cannot change your password without choosing a new one.