@@ -, +, @@ --- C4/Biblio.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -2895,11 +2895,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; --