]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 798927: An error should be thrown when passing an illegal pronoun
authorImran Chaudhry <ichaudhry+mozilla@gmail.com>
Fri, 27 Sep 2013 23:09:29 +0000 (01:09 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 27 Sep 2013 23:09:29 +0000 (01:09 +0200)
r=LpSolit a=justdave

Bugzilla/Search.pm
template/en/default/global/user-error.html.tmpl

index a7600f44941fb165de0b5172c3f35a3510844a17..7bd4381ed11822e98a6f4a1a4e9183457922a73d 100644 (file)
@@ -2196,7 +2196,8 @@ sub pronoun {
     if ($noun eq "%qacontact%") {
         return "COALESCE(bugs.qa_contact,0)";
     }
-    return 0;
+
+    ThrowUserError('illegal_pronoun', { pronoun => $noun });
 }
 
 sub _contact_pronoun {
index 1a3aa07ac59e8e6912423564720804fa592d2882..939eb2c3c8428ce51d5e48de431ddeceef8609fd 100644 (file)
     Your group control combination for group &quot;
     [% groupname FILTER html %]&quot; 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" %]
     [% title = "Illegal Search Name" %]
     The name of your search cannot contain any of the following characters: