From a293f01ec8fd15d85b05f7958cb2ea47640b5ea9 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Tue, 1 Aug 2017 13:55:25 -0400 Subject: [PATCH] [SIGNED-OFF] Bug 14385: Add some commenting to make sense of logic Signed-off-by: Aleisha Amohia --- C4/Biblio.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index d420d5a..6127ded 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2911,11 +2911,16 @@ sub EmbedItemsInMarcBiblio { my $dbh = C4::Context->dbh; my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber = ?"); $sth->execute($biblionumber); - my @item_fields; my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); - my @items; + + my @item_fields; # Array holding the actual MARC data for items to be included. + my @items; # Array holding items which are both in the list ($itenumbers) + # and on this biblionumber. + + # Flag indicating if there is potential hiding. my $opachiddenitems = $opac && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ ); + require C4::Items; while ( my ($itemnumber) = $sth->fetchrow_array ) { next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; -- 2.1.4