[open-ils-commits] r10915 - branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Oct 25 23:38:20 EDT 2008
Author: miker
Date: 2008-10-25 23:38:14 -0400 (Sat, 25 Oct 2008)
New Revision: 10915
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
correcting transmission format
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2008-10-25 14:43:30 UTC (rev 10914)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2008-10-26 03:38:14 UTC (rev 10915)
@@ -215,9 +215,11 @@
my $service = shift;
my $tformat = $services{$service}->{transmission_format} || $output;
- my $rformat = $services{$service}->{record_format} || 'FI';
+ my $rformat = $services{$service}->{record_format};
+
$results->option(elementSetName => $rformat);
- $logger->info("z3950: using record format '$rformat'");
+ $results->option(preferredRecordSyntax => $tformat);
+ $logger->info("z3950: using record format '$rformat' and transmission format '$tformat'");
my @records;
my $res = {};
@@ -243,9 +245,9 @@
my $rec = $results->record($_);
- if ($tformat eq 'usmarc') {
+ if (lc($tformat) eq 'usmarc') {
$marc = MARC::Record->new_from_usmarc($rec->raw());
- } elsif ($tformat eq 'xml') {
+ } elsif (lc($tformat) eq 'xml') {
$marc = MARC::Record->new_from_xml($rec->raw());
} else {
die "Unsupported record transmission format $tformat"
More information about the open-ils-commits
mailing list