From: miker Date: Mon, 25 Jan 2010 13:44:34 +0000 (+0000) Subject: Backporting fix for https://bugs.launchpad.net/evergreen/+bug/506827 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f9f321a54eeee8a9a5c28743f7c6b32c7cdc2686;p=Evergreen.git Backporting fix for https://bugs.launchpad.net/evergreen/+bug/506827 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15375 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index bfda50c0d4..ab4e2db326 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($qpart, 0, $where++); + my $value = substr($qpart, $where); + next unless $type and $value; $value =~ s/^\s*//og;