From 77f77959a30cac86adfa7e163a64f61affb16648 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 10 Feb 2011 18:23:51 -0500 Subject: [PATCH] more SVF filter cleanup --- .../lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index 3836672323..ae1e34386b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -513,7 +513,6 @@ sub toSQL { my ($filter) = $self->find_filter($f); if ($filter) { - $dyn_filters{$f} = ''; my @fargs = @{$filter->args}; if (@fargs > 1) { @@ -530,11 +529,10 @@ sub toSQL { } my $combined_dyn_filters = ''; - $combined_dyn_filters = 'mrd.attrs @> (' . join(' || ', @{$dyn_filters{''}}) . ')' if (@{$dyn_filters{''}}); + $combined_dyn_filters .= 'AND mrd.attrs @> (' . join(' || ', @{$dyn_filters{''}}) . ') ' if (@{$dyn_filters{''}}); delete($dyn_filters{''}); - $combined_dyn_filters .= ' AND ' if ($combined_dyn_filters); - $combined_dyn_filters .= join(' AND ', values(%dyn_filters)); + $combined_dyn_filters .= 'AND ' . join(' AND ', values(%dyn_filters)); my $rank = $rel; -- 2.11.0