@@ -, +, @@ --- opac/opac-downloadcart.pl | 6 ++++++ opac/opac-downloadshelf.pl | 7 +++++++ 2 files changed, 13 insertions(+) --- a/opac/opac-downloadcart.pl +++ a/opac/opac-downloadcart.pl @@ -66,6 +66,12 @@ if ($bib_list && $format) { # CSV if ($format =~ /^\d+$/) { + my $csv_profile = Koha::CsvProfiles->find($format); + if ( not $csv_profile or $csv_profile->staff_only ) { + print $query->redirect('/cgi-bin/koha/errors/404.pl'); + exit; + } + $output = marc2csv(\@bibs, $format); # Other formats --- a/opac/opac-downloadshelf.pl +++ a/opac/opac-downloadshelf.pl @@ -75,6 +75,13 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { # CSV if ($format =~ /^\d+$/) { + + my $csv_profile = Koha::CsvProfiles->find($format); + if ( not $csv_profile or $csv_profile->staff_only ) { + print $query->redirect('/cgi-bin/koha/errors/404.pl'); + exit; + } + my @biblios; while ( my $content = $contents->next ) { push @biblios, $content->biblionumber; --