Adds hyphen to regex looking for index names in buildQuery.
Test by searching on Control-number=...
---
 C4/Search.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 98db887..fdb3479 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1075,7 +1075,7 @@ sub buildQuery {
     my $cclq       = 0;
     my $cclindexes = getIndexes();
     if ( $query !~ /\s*ccl=/ ) {
-        while ( !$cclq && $query =~ /(?:^|\W)(\w+)(,\w+)*[:=]/g ) {
+        while ( !$cclq && $query =~ /(?:^|\W)([\w-]+)(,[\w-]+)*[:=]/g ) {
             my $dx = lc($1);
             $cclq = grep { lc($_) eq $dx } @$cclindexes;
         }
-- 
1.6.0.6

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to