From f470e266ade7f91042339cfe2fdc62b0297610a6 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy 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 Signed-off-by: Paul Poulain (cherry picked from commit 32d8abbb43729aedfe20d30a9acc21d4f7268ec9) Signed-off-by: Chris Nighswonger --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 98db88704a..fdb34790a3 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; } -- 2.39.5