From: miker Date: Mon, 7 Mar 2011 16:02:56 +0000 (+0000) Subject: more SVF filter cleanup X-Git-Tag: kcls-grey-screen-prod1~2^2~46 X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=53aa8029a6fae21e61fb5a823fce136432b276b6 more SVF filter cleanup git-svn-id: svn://svn.open-ils.org/ILS/trunk@19603 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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;