]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/pkgreport.cgi
* Allow tag instead of tags; silently normalize it (closes: #567407).
[debbugs.git] / cgi / pkgreport.cgi
index 3fc500b355114472122bee11d936a0f60203b51f..b7fc845a510e50a8c21958c52a42fa236d5e386b 100755 (executable)
@@ -77,7 +77,8 @@ if (exists $param{form_options} and defined $param{form_options}) {
      }
      for my $incexc (qw(include exclude)) {
          next unless exists $param{$incexc};
-         $param{$incexc} = [grep /\S\:\S/, make_list($param{$incexc})];
+         # normalize tag to tags
+         $param{$incexc} = [map {s/^tag:/tags:/} grep /\S\:\S/, make_list($param{$incexc})];
      }
      for my $key (keys %package_search_keys) {
          next unless exists $param{key};
@@ -93,6 +94,16 @@ if (exists $param{form_options} and defined $param{form_options}) {
      exit 0;
 }
 
+# normalize innclude/exclude keys; currently this is in two locations,
+# which is suboptimal. Closes: #567407
+for my $incexc (qw(include exclude)) {
+    next unless exists $param{$incexc};
+    # normalize tag to tags
+    $param{$incexc} = [map {s/^tag:/tags:/} make_list($param{$incexc})];
+}
+
+
+
 # map from yes|no to 1|0
 for my $key (qw(repeatmerged bug-rev pend-rev sev-rev)) {
      if (exists $param{$key}){