From 19b81874ffbdf91f4acbe93f8e8f4c44f111c6a1 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 1 Nov 2011 11:35:41 -0400 Subject: [PATCH] Tpac; bookbag MARC retrieved via unapi Make sure the bookbag interface has access to metabib.record_attr's by retrieving and parsing the marcxml via unapi (get_records_and_facets). Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- .../src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index fe0da834f4..c84bed415d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1399,14 +1399,13 @@ sub load_myopac_bookbags { my $items = $U->bib_container_items_via_search($bookbag->id, $query) or return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; - # Maybe save a little memory by creating only one XML::LibXML::Document - # instance for each record, even if record is repeated across bookbags. + my (undef, @recs) = $self->get_records_and_facets( + [ map {$_->target_biblio_record_entry->id} @$items ], + undef, + {flesh => '{mra}'} + ); - foreach my $rec (map { $_->target_biblio_record_entry } @$items) { - next if $ctx->{bookbags_marc_xml}{$rec->id}; - $ctx->{bookbags_marc_xml}{$rec->id} = - (new XML::LibXML)->parse_string($rec->marc); - } + $ctx->{bookbags_marc_xml}{$_->{id}} = $_->{marc_xml} for @recs; $bookbag->items($items); } -- 2.11.0