[open-ils-commits] r15369 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 22 16:18:15 EST 2010
Author: miker
Date: 2010-01-22 16:18:10 -0500 (Fri, 22 Jan 2010)
New Revision: 15369
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
Should address https://bugs.launchpad.net/bugs/506827 by looking for the position of the first : after a known key
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-22 20:28:28 UTC (rev 15368)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-22 21:18:10 UTC (rev 15369)
@@ -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($qpart1, 0, $where++);
+ my $value = substr($qpart1, $where);
+
next unless $type and $value;
$value =~ s/^\s*//og;
More information about the open-ils-commits
mailing list