From: erickson Date: Tue, 18 Mar 2008 14:23:20 +0000 (+0000) Subject: added config option for defining the downloaded record format for each Z source X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3bb7081405fcd33ac9f980f700eb3ae078fc9901;p=Evergreen.git added config option for defining the downloaded record format for each Z source git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9068 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index 48bdaab846..0b804e6ff5 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -93,6 +93,8 @@ Example opensrf config file for OpenILS z3950.loc.gov 7090 Voyager + + FI 121 76 diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index 71bc3ae4b3..e2dd3f9c27 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -195,7 +195,7 @@ sub do_search { $logger->info("z3950: search [$query] took ".(time - $start)." seconds"); - my $munged = process_results($results, $limit, $offset); + my $munged = process_results($results, $limit, $offset, $$args{service}); $munged->{query} = $query; return $munged; @@ -210,8 +210,11 @@ sub process_results { my $results = shift; my $limit = shift; my $offset = shift; + my $service = shift; - $results->option(elementSetName => "FI"); # full records with no holdings + my $rformat = $services{$service}->{record_format} || 'FI'; + $results->option(elementSetName => $rformat); + $logger->info("z3950: using record format '$rformat'"); my @records; my $res = {};