allow filter negation (e.g. -item_type(a) ) in dynamic filter query string building
authorberick <berick@esilibrary.com>
Wed, 20 Apr 2011 18:52:00 +0000 (14:52 -0400)
committerberick <berick@esilibrary.com>
Wed, 20 Apr 2011 18:52:00 +0000 (14:52 -0400)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm

index 524c9a6..5f8643a 100644 (file)
@@ -53,7 +53,7 @@ sub _prepare_biblio_search {
 
     # filters
     foreach (grep /^fi:/, $cgi->param) {
-        /:(\w+)$/ or next;
+        /:(-?\w+)$/ or next;
         my $term = join(",", $cgi->param($_));
         $query .= " $1($term)" if length $term;
     }