Commit 51e15329 authored by Imran Chaudhry's avatar Imran Chaudhry Committed by Frédéric Buclin

Bug 798927: An error should be thrown when passing an illegal pronoun

r=LpSolit a=justdave
parent 2d802ebc
...@@ -2196,7 +2196,8 @@ sub pronoun { ...@@ -2196,7 +2196,8 @@ sub pronoun {
if ($noun eq "%qacontact%") { if ($noun eq "%qacontact%") {
return "COALESCE(bugs.qa_contact,0)"; return "COALESCE(bugs.qa_contact,0)";
} }
return 0;
ThrowUserError('illegal_pronoun', { pronoun => $noun });
} }
sub _contact_pronoun { sub _contact_pronoun {
......
...@@ -891,6 +891,13 @@ ...@@ -891,6 +891,13 @@
Your group control combination for group " Your group control combination for group "
[% groupname FILTER html %]" is illegal. [% groupname FILTER html %]" is illegal.
[% ELSIF error == "illegal_pronoun" %]
[% title = "Illegal Pronoun" %]
The pronoun you used ([% pronoun FILTER html %]) is illegal. You must use
one of the approved pronouns. Please see
<a href="[% docs_urlbase FILTER html %]query.html#pronouns">Pronoun Substitution</a>
for a complete list.
[% ELSIF error == "illegal_query_name" %] [% ELSIF error == "illegal_query_name" %]
[% title = "Illegal Search Name" %] [% title = "Illegal Search Name" %]
The name of your search cannot contain any of the following characters: The name of your search cannot contain any of the following characters:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment