From e61072b4e9cdce83550e2fae538639ff8c5d1526 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 18 Jul 2008 01:13:10 +0000 Subject: [PATCH] add shelving location filter support git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@10063 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Storage/Publisher/metabib.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm index f89422030a..cb61493fe9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm @@ -2321,7 +2321,7 @@ sub staged_fts { die "No search arguments were passed to ".$self->api_name; } - my (@statuses,@types,@forms,@lang,@aud,@lit_form,@vformats); + my (@statuses,@locations,@types,@forms,@lang,@aud,@lit_form,@vformats); if ($args{available}) { @statuses = (0,7); @@ -2332,6 +2332,11 @@ sub staged_fts { @statuses = @$s; } + if (my $s = $args{locations}) { + $s = [$s] if (!ref($s)); + @locations = @$s; + } + if (my $a = $args{audience}) { $a = [$a] if (!ref($a)); @aud = @$a; @@ -2414,6 +2419,7 @@ sub staged_fts { my $param_depth = $args{depth}; $param_depth = 'NULL' unless (defined($param_depth) and length($param_depth) > 0 ); my $param_searches = OpenSRF::Utils::JSON->perl2JSON( \%stored_proc_search_args ); $param_searches =~ s/\$//go; $param_searches = '$$'.$param_searches.'$$'; my $param_statuses = '$${' . join(',', map { s/\$//go; "\"$_\""} @statuses) . '}$$'; + my $param_locations = '$${' . join(',', map { s/\$//go; "\"$_\""} @locations) . '}$$'; my $param_audience = '$${' . join(',', map { s/\$//go; "\"$_\"" } @aud) . '}$$'; my $param_language = '$${' . join(',', map { s/\$//go; "\"$_\""} @lang) . '}$$'; my $param_lit_form = '$${' . join(',', map { s/\$//go; "\"$_\"" } @lit_form) . '}$$'; @@ -2437,6 +2443,7 @@ sub staged_fts { $param_depth, $param_searches, $param_statuses, + $param_locations, $param_audience, $param_language, $param_lit_form, -- 2.11.0