[open-ils-commits] r7597 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 27 13:41:34 EDT 2007
Author: miker
Date: 2007-07-27 13:40:17 -0400 (Fri, 27 Jul 2007)
New Revision: 7597
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
Log:
add support for authority export
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2007-07-27 17:14:47 UTC (rev 7596)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2007-07-27 17:40:17 UTC (rev 7597)
@@ -54,7 +54,12 @@
return 200 unless (@records);
- my $holdings = $cgi->param('holdings');
+ my $type = $cgi->param('rectype') || 'biblio';
+ if ($type ne 'biblio && $type ne 'authority') {
+ die "Bad record type: $type";
+ }
+
+ my $holdings = $cgi->param('holdings') if ($type eq 'biblio');
my $location = $cgi->param('location') || 'gaaagpl'; # just because...
my $format = $cgi->param('format') || 'USMARC';
@@ -73,8 +78,8 @@
}
if ($format ne 'XML') {
- my $type = 'MARC::File::' . $format;
- $type->require;
+ my $ftype = 'MARC::File::' . $format;
+ $ftype->require;
}
my $ses = OpenSRF::AppSession->create('open-ils.cstore');
@@ -124,7 +129,7 @@
try {
local $SIG{ALRM} = sub { die "TIMEOUT\n" };
alarm(1);
- $bib = $ses->request( 'open-ils.cstore.direct.biblio.record_entry.retrieve', $i, $flesh )->gather(1);
+ $bib = $ses->request( "open-ils.cstore.direct.$type.record_entry.retrieve", $i, $flesh )->gather(1);
alarm(0);
} otherwise {
warn "\n!!!!!! Timed out trying to read record $i\n";
More information about the open-ils-commits
mailing list