[open-ils-commits] r15375 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Search (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 25 08:44:36 EST 2010
Author: miker
Date: 2010-01-25 08:44:34 -0500 (Mon, 25 Jan 2010)
New Revision: 15375
Modified:
branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
Backporting fix for https://bugs.launchpad.net/evergreen/+bug/506827
Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-23 15:25:29 UTC (rev 15374)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-25 13:44:34 UTC (rev 15375)
@@ -563,8 +563,12 @@
$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;
More information about the open-ils-commits
mailing list