From 53aa8029a6fae21e61fb5a823fce136432b276b6 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 7 Mar 2011 16:02:56 +0000 Subject: [PATCH] more SVF filter cleanup git-svn-id: svn://svn.open-ils.org/ILS/trunk@19603 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../Application/Storage/Driver/Pg/QueryParser.pm | 6 ++---- 1 files 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 3836672..ae1e343 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; -- 1.7.2.5