Lines 2933-2944
sub EmbedItemsInMarcBiblio {
Link Here
|
2933 |
require C4::Items; |
2933 |
require C4::Items; |
2934 |
while ( my ($itemnumber) = $sth->fetchrow_array ) { |
2934 |
while ( my ($itemnumber) = $sth->fetchrow_array ) { |
2935 |
next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; |
2935 |
next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; |
2936 |
my $i = C4::Items::GetItem($itemnumber) if $opachiddenitems; |
2936 |
my $i = $opachiddenitems ? C4::Items::GetItem($itemnumber) : undef; |
2937 |
push @items, { itemnumber => $itemnumber, item => $i }; |
2937 |
push @items, { itemnumber => $itemnumber, item => $i }; |
2938 |
} |
2938 |
} |
2939 |
my @hiddenitems = |
2939 |
my @hiddenitems = |
2940 |
C4::Items::GetHiddenItemnumbers( map { $_->{item} } @items ) |
2940 |
$opachiddenitems |
2941 |
if $opachiddenitems; |
2941 |
? C4::Items::GetHiddenItemnumbers( map { $_->{item} } @items ) |
|
|
2942 |
: (); |
2942 |
# Convert to a hash for quick searching |
2943 |
# Convert to a hash for quick searching |
2943 |
my %hiddenitems = map { $_ => 1 } @hiddenitems; |
2944 |
my %hiddenitems = map { $_ => 1 } @hiddenitems; |
2944 |
foreach my $itemnumber ( map { $_->{itemnumber} } @items ) { |
2945 |
foreach my $itemnumber ( map { $_->{itemnumber} } @items ) { |
2945 |
- |
|
|