use CGI qw ( -utf8 );
use C4::Koha;
-use C4::Biblio;
-use C4::Items;
-use C4::Circulation;
-use C4::Auth;
-use C4::Output;
+use C4::Biblio qw(
+ GetBiblioData
+ GetFrameworkCode
+ GetMarcAuthors
+ GetMarcBiblio
+ GetMarcSeries
+ GetMarcSubjects
+ GetMarcUrls
+);
+use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
+use C4::Circulation qw( GetTransfers );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
use Koha::RecordProcessor;
use Koha::CsvProfiles;
use Koha::AuthorisedValues;
}
my $record_processor = Koha::RecordProcessor->new({ filters => 'ViewPolicy' });
+my $rules = C4::Context->yaml_preference('OpacHiddenItems');
+
foreach my $biblionumber ( @bibs ) {
$template->param( biblionumber => $biblionumber );
my @hidden_items = GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat });
# If every item is hidden, then the biblio should be hidden too.
- next if (scalar @all_items >= 1 && scalar @hidden_items == scalar @all_items);
+ next
+ if $biblio->hidden_in_opac({ rules => $rules });
# copy the visible ones into the items array.
my @items;