Lines 2943-2954
sub EmbedItemsInMarcBiblio {
Link Here
|
2943 |
require C4::Items; |
2943 |
require C4::Items; |
2944 |
while ( my ($itemnumber) = $sth->fetchrow_array ) { |
2944 |
while ( my ($itemnumber) = $sth->fetchrow_array ) { |
2945 |
next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; |
2945 |
next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; |
2946 |
my $i = C4::Items::GetItem($itemnumber) if $opachiddenitems; |
2946 |
my $i = $opachiddenitems ? C4::Items::GetItem($itemnumber) : undef; |
2947 |
push @items, { itemnumber => $itemnumber, item => $i }; |
2947 |
push @items, { itemnumber => $itemnumber, item => $i }; |
2948 |
} |
2948 |
} |
2949 |
my @hiddenitems = |
2949 |
my @hiddenitems = |
2950 |
C4::Items::GetHiddenItemnumbers( map { $_->{item} } @items ) |
2950 |
$opachiddenitems |
2951 |
if $opachiddenitems; |
2951 |
? C4::Items::GetHiddenItemnumbers( map { $_->{item} } @items ) |
|
|
2952 |
: (); |
2952 |
# Convert to a hash for quick searching |
2953 |
# Convert to a hash for quick searching |
2953 |
my %hiddenitems = map { $_ => 1 } @hiddenitems; |
2954 |
my %hiddenitems = map { $_ => 1 } @hiddenitems; |
2954 |
foreach my $itemnumber ( map { $_->{itemnumber} } @items ) { |
2955 |
foreach my $itemnumber ( map { $_->{itemnumber} } @items ) { |
2955 |
- |
|
|