From 86fb3e7e88a971617af9ca75e6c626a07095ed5a Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 22 Jan 2010 21:18:10 +0000 Subject: [PATCH] Should address https://bugs.launchpad.net/bugs/506827 by looking for the position of the first : after a known key git-svn-id: svn://svn.open-ils.org/ILS/trunk@15369 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index bfda50c0d4..7ef4e94d11 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -563,8 +563,12 @@ sub multiclass_query { $logger->debug("cleansed query string => $query"); my $search = $arghash->{searches} = {}; - while ($query =~ s/((?:keyword(?:\|\w+)?|title(?:\|\w+)?|author(?:\|\w+)?|subject(?:\|\w+)?|series(?:\|\w+)?|site|dir|sort|lang|available):[^:]+)$//so) { - my($type, $value) = split(':', $1); + while ($query =~ s/((?:keyword(?:\|\w+)?|title(?:\|\w+)?|author(?:\|\w+)?|subject(?:\|\w+)?|series(?:\|\w+)?|site|dir|sort|lang|available):.+?)$//so) { + my $qpart = $1; + my $where = index($qpart,':'); + my $type = substr($qpart1, 0, $where++); + my $value = substr($qpart1, $where); + next unless $type and $value; $value =~ s/^\s*//og; -- 2.11.0