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

(-)a/opac/opac-export.pl (-2 / +8 lines)
Lines 33-39 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);
36
use List::MoreUtils qw(none any);
37
37
38
my $query = CGI->new;
38
my $query = CGI->new;
39
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
Lines 42-48 my $biblionumber = $query->param("bib")||0; Link Here
42
$biblionumber = int($biblionumber);
42
$biblionumber = int($biblionumber);
43
my $error = q{};
43
my $error = q{};
44
44
45
my @dc_subtypes   = qw(rdfdc oaidc srwdc);
45
my @valid_formats = split( ',', C4::Context->preference('OpacExportOptions') // '' );
46
my @valid_formats = split( ',', C4::Context->preference('OpacExportOptions') // '' );
47
48
if ( any { $_ eq 'dc' } @valid_formats ) {
49
    # DC enabled, add @dc_subtypes to @valid_formats
50
    @valid_formats = ( @valid_formats, @dc_subtypes );
51
}
52
46
if ( !scalar @valid_formats || none { $format eq $_ } @valid_formats ) {
53
if ( !scalar @valid_formats || none { $format eq $_ } @valid_formats ) {
47
    # bad request: either the feature is disabled, or requested a format the
54
    # bad request: either the feature is disabled, or requested a format the
48
    # library hasn't made available
55
    # library hasn't made available
49
- 

Return to bug 37679