[Patches] [PATCH] Bug 6786: Follow up fixing index names with hyphens
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Mon Dec 5 20:55:02 NZDT 2011
From: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date: Sun, 4 Dec 2011 17:29:05 +0100
Subject: [PATCH] Bug 6786: Follow up fixing index names with hyphens
Adds hyphen to regex looking for index names in buildQuery.
Test by searching on Control-number=...
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
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.7.5.4
More information about the Patches
mailing list