[open-ils-commits] r7600 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 27 13:50:16 EDT 2007
Author: miker
Date: 2007-07-27 13:49:00 -0400 (Fri, 27 Jul 2007)
New Revision: 7600
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
Log:
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2007-07-27 17:45:37 UTC (rev 7599)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2007-07-27 17:49:00 UTC (rev 7600)
@@ -166,43 +166,45 @@
);
- my $cn_list = $bib->call_numbers;
- if ($cn_list && @$cn_list) {
+ if ($holdings) {
+ my $cn_list = $bib->call_numbers;
+ if ($cn_list && @$cn_list) {
- my $cp_list = [ map { @{ $_->copies } } @$cn_list ];
- if ($cp_list && @$cp_list) {
+ my $cp_list = [ map { @{ $_->copies } } @$cn_list ];
+ if ($cp_list && @$cp_list) {
- my %cn_map;
- push @{$cn_map{$_->call_number}}, $_ for (@$cp_list);
+ my %cn_map;
+ push @{$cn_map{$_->call_number}}, $_ for (@$cp_list);
- for my $cn ( @$cn_list ) {
- my $cn_map_list = $cn_map{$cn->id};
+ for my $cn ( @$cn_list ) {
+ my $cn_map_list = $cn_map{$cn->id};
- for my $cp ( @$cn_map_list ) {
+ for my $cp ( @$cn_map_list ) {
- $r->append_fields(
- MARC::Field->new(
- 852, '4', '',
- a => $location,
- b => $orgs{$cn->owning_lib}->shortname,
- b => $orgs{$cp->circ_lib}->shortname,
- c => $shelves{$cp->location}->name,
- j => $cn->label,
- ($cp->circ_modifier ? ( g => $cp->circ_modifier ) : ()),
- p => $cp->barcode,
- ($cp->price ? ( y => $cp->price ) : ()),
- ($cp->copy_number ? ( t => $cp->copy_number ) : ()),
- ($cp->ref eq 't' ? ( x => 'reference' ) : ()),
- ($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()),
- ($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()),
- ($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()),
- )
- );
+ $r->append_fields(
+ MARC::Field->new(
+ 852, '4', '',
+ a => $location,
+ b => $orgs{$cn->owning_lib}->shortname,
+ b => $orgs{$cp->circ_lib}->shortname,
+ c => $shelves{$cp->location}->name,
+ j => $cn->label,
+ ($cp->circ_modifier ? ( g => $cp->circ_modifier ) : ()),
+ p => $cp->barcode,
+ ($cp->price ? ( y => $cp->price ) : ()),
+ ($cp->copy_number ? ( t => $cp->copy_number ) : ()),
+ ($cp->ref eq 't' ? ( x => 'reference' ) : ()),
+ ($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()),
+ ($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()),
+ ($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()),
+ )
+ );
+ }
}
}
- }
- }
+ }
+ }
if (uc($format) eq 'XML') {
my $x = $r->as_xml_record;
More information about the open-ils-commits
mailing list