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

(-)a/C4/Biblio.pm (-3 / +7 lines)
Lines 2895-2905 sub EmbedItemsInMarcBiblio { Link Here
2895
    my $dbh = C4::Context->dbh;
2895
    my $dbh = C4::Context->dbh;
2896
    my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber = ?");
2896
    my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber = ?");
2897
    $sth->execute($biblionumber);
2897
    $sth->execute($biblionumber);
2898
    my @item_fields;
2899
    my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode );
2898
    my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode );
2900
    my @items;
2899
2900
    my @item_fields; # Array holding the actual MARC data for items to be included.
2901
    my @items;       # Array holding items which are both in the list ($itenumbers)
2902
                     # and on this biblionumber.
2903
2904
    # Flag indicating if there is potential hiding.
2901
    my $opachiddenitems = $opac
2905
    my $opachiddenitems = $opac
2902
      && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
2906
      && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
2907
2903
    require C4::Items;
2908
    require C4::Items;
2904
    while ( my ($itemnumber) = $sth->fetchrow_array ) {
2909
    while ( my ($itemnumber) = $sth->fetchrow_array ) {
2905
        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
2910
        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
2906
- 

Return to bug 14385