LP#1310283: Propogate .staff through Z3950 searches
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 22 Apr 2014 13:20:20 +0000 (09:20 -0400)
committerBen Shum <bshum@biblio.org>
Wed, 23 Apr 2014 14:17:50 +0000 (10:17 -0400)
So that local catalog Z3950 searches don't only show opac visible bibs.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm

index 0009024..15685b0 100644 (file)
@@ -1008,7 +1008,10 @@ sub cat_search_z_style_wrapper {
     $$searchhash{searches}{keyword}{term} .= join ' ', $$searchhash{searches}{keyword}{term}, $$args{search}{pubdate}   if $$args{search}{pubdate};
     $$searchhash{searches}{keyword}{term} .= join ' ', $$searchhash{searches}{keyword}{term}, $$args{search}{item_type} if $$args{search}{item_type};
 
-    my ($list) = $self->method_lookup('open-ils.search.biblio.multiclass.staged')->run( $searchhash );
+    my $method = 'open-ils.search.biblio.multiclass.staged';
+    $method .= '.staff' if $self->api_name =~ /staff$/;
+
+    my ($list) = $self->method_lookup($method)->run( $searchhash );
 
     if ($list->{count} > 0 and @{$list->{ids}}) {
         $result->{count} = $list->{count};