View | Details | Raw Unified | Return to bug 14385
Collapse All | Expand All

(-)a/C4/Biblio.pm (-3 / +7 lines)
Lines 2911-2921 sub EmbedItemsInMarcBiblio { Link Here
2911
    my $dbh = C4::Context->dbh;
2911
    my $dbh = C4::Context->dbh;
2912
    my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber = ?");
2912
    my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber = ?");
2913
    $sth->execute($biblionumber);
2913
    $sth->execute($biblionumber);
2914
    my @item_fields;
2915
    my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode );
2914
    my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode );
2916
    my @items;
2915
2916
    my @item_fields; # Array holding the actual MARC data for items to be included.
2917
    my @items;       # Array holding items which are both in the list ($itenumbers)
2918
                     # and on this biblionumber.
2919
2920
    # Flag indicating if there is potential hiding.
2917
    my $opachiddenitems = $opac
2921
    my $opachiddenitems = $opac
2918
      && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
2922
      && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
2923
2919
    require C4::Items;
2924
    require C4::Items;
2920
    while ( my ($itemnumber) = $sth->fetchrow_array ) {
2925
    while ( my ($itemnumber) = $sth->fetchrow_array ) {
2921
        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
2926
        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
2922
- 

Return to bug 14385