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

(-)a/opac/opac-export.pl (-1 / +10 lines)
Lines 33-38 use C4::Ris qw( marc2ris ); Link Here
33
use Koha::Biblios;
33
use Koha::Biblios;
34
use Koha::RecordProcessor;
34
use Koha::RecordProcessor;
35
35
36
use List::MoreUtils qw(none);
37
36
my $query = CGI->new;
38
my $query = CGI->new;
37
my $op=$query->param("op")||''; #op=export is currently the only use
39
my $op=$query->param("op")||''; #op=export is currently the only use
38
my $format=$query->param("format")||'utf8';
40
my $format=$query->param("format")||'utf8';
Lines 40-45 my $biblionumber = $query->param("bib")||0; Link Here
40
$biblionumber = int($biblionumber);
42
$biblionumber = int($biblionumber);
41
my $error = q{};
43
my $error = q{};
42
44
45
my @valid_formats = split( ',', C4::Context->preference('OpacExportOptions') // '' );
46
if ( !scalar @valid_formats || none { $format eq $_ } @valid_formats ) {
47
    # bad request: either the feature is disabled, or requested a format the
48
    # library hasn't made available
49
    print $query->redirect("/cgi-bin/koha/errors/400.pl");
50
    exit;
51
}
52
43
# Determine logged in user's patron category.
53
# Determine logged in user's patron category.
44
# Blank if not logged in.
54
# Blank if not logged in.
45
my $userenv = C4::Context->userenv;
55
my $userenv = C4::Context->userenv;
46
- 

Return to bug 37370