[open-ils-commits] r8846 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Mar 1 12:03:27 EST 2008
Author: miker
Date: 2008-03-01 11:31:38 -0500 (Sat, 01 Mar 2008)
New Revision: 8846
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
adjusting cql qualifier logic
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2008-03-01 16:13:02 UTC (rev 8845)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2008-03-01 16:31:38 UTC (rev 8846)
@@ -1449,26 +1449,32 @@
my $relation = $self->getRelation();
my $query;
- if ( $qualifier and $qualifier_map{lc($qualifier)} ) {
- my $base = $relation->getBase();
- my @modifiers = $relation->getModifiers();
+ if ( $qualifier ) {
- foreach my $m ( @modifiers ) {
- if( $m->[ 1 ] eq 'fuzzy' ) {
- $term = "$term~";
- }
+ if ( exists($qualifier_map{lc($qualifier)}) ) {
+ $qualifier = 'kw' unless ( defined($qualifier_map{lc($qualifier)}) );
}
+
+ #my @modifiers = $relation->getModifiers();
+
+ #foreach my $m ( @modifiers ) {
+ # if( $m->[ 1 ] eq 'fuzzy' ) {
+ # $term = "$term~";
+ # }
+ #}
+
+ my $base = $relation->getBase();
if( $base eq '=' ) {
$base = ':';
} else {
croak( "Evergreen doesn't support relations other than '='" );
}
+
return "$qualifier$base$term";
- } elsif ($qualifier) {
+
+ } else {
return "kw:$term";
- } else {
- return "";
}
}
}
More information about the open-ils-commits
mailing list