[open-ils-commits] r10343 - in branches/rel_1_2_3/Open-ILS:
examples src/perlmods/OpenILS/Application/Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 12 11:09:51 EDT 2008
Author: miker
Date: 2008-08-12 11:09:48 -0400 (Tue, 12 Aug 2008)
New Revision: 10343
Modified:
branches/rel_1_2_3/Open-ILS/examples/opensrf.xml.example
branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
support /really/ bare zebra installations that do not like elementSetName
Modified: branches/rel_1_2_3/Open-ILS/examples/opensrf.xml.example
===================================================================
--- branches/rel_1_2_3/Open-ILS/examples/opensrf.xml.example 2008-08-12 02:16:22 UTC (rev 10342)
+++ branches/rel_1_2_3/Open-ILS/examples/opensrf.xml.example 2008-08-12 15:09:48 UTC (rev 10343)
@@ -94,7 +94,7 @@
<port>7090</port>
<db>Voyager</db>
- <!-- fetch the full record with no holdings. FI is the default -->
+ <!-- fetch the full record with no holdings. FI is the most common setting -->
<record_format>FI</record_format>
<!-- Record transmission format from the server. Supported -->
Modified: branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2008-08-12 02:16:22 UTC (rev 10342)
+++ branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2008-08-12 15:09:48 UTC (rev 10343)
@@ -215,10 +215,12 @@
my $service = shift;
my $tformat = $services{$service}->{transmission_format} || $output;
- my $rformat = $services{$service}->{record_format} || 'FI';
- $results->option(elementSetName => $rformat);
- $logger->info("z3950: using record format '$rformat'");
+ my $rformat = $services{$service}->{record_format};
+ $results->option(elementSetName => $rformat);
+ $results->option(preferredRecordSyntax => $tformat);
+ $logger->info("z3950: using record format '$rformat' and transmission format '$tformat'");
+
my @records;
my $res = {};
my $count = $$res{count} = $results->size;
@@ -243,10 +245,10 @@
my $rec = $results->record($_);
- if ($tformat eq 'usmarc') {
- $marc = MARC::Record->new_from_usmarc($rec->raw());
- } elsif ($tformat eq 'xml') {
- $marc = MARC::Record->new_from_xml($rec->raw());
+ if (lc($tformat) eq 'usmarc') {
+ $marc = MARC::Record->new_from_usmarc($rec->raw());
+ } 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