]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 238544: Emit appropriate error if content and matches are used in
authorbugreport%peshkin.net <>
Thu, 22 Jul 2004 13:57:09 +0000 (13:57 +0000)
committerbugreport%peshkin.net <>
Thu, 22 Jul 2004 13:57:09 +0000 (13:57 +0000)
            invalid search combinations.
r=jouni
a=justdave

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

index 04a0004fe0f3375bf2daa770ffdc7c76a85b00c3..683c2e0573146c89a51fa55d82894c17d01642f4 100644 (file)
@@ -450,6 +450,9 @@ sub init {
                  push(@fields, $select_term);
              }
          },
+         "^content," => sub {
+             ThrowUserError("search_content_without_matches");
+         },
          "^commenter," => sub {    
              my $chartseq;
              my $list;
@@ -784,6 +787,9 @@ sub init {
          ",lessthan" => sub {
              $term = "$ff < $q";
          },
+         ",matches" => sub {
+             ThrowUserError("search_content_without_matches");
+         },
          ",greaterthan" => sub {
              $term = "$ff > $q";
          },
index 5ff7fedec410aa2034a891222d313b96c9060668..af99313f03bb26df8aa76a2915c200a45307c507 100644 (file)
     [% title = "Access Denied" %]
     You do not have the permissions necessary to run a sanity check.
 
+  [% ELSIF error == "search_content_without_matches" %]
+    [% title = "Illegal Search" %]
+    The "content" field can only be used with "matches" search 
+    and the "matches" search can only be used with the "content"
+    field.
+
   [% ELSIF error == "series_already_exists" %]
     [% title = "Series Already Exists" %]
       A series named <em>[% series.category FILTER html %] /