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

(-)a/C4/XSLT.pm (+2 lines)
Lines 377-382 sub engine { Link Here
377
377
378
sub CustomXSLTExportList {
378
sub CustomXSLTExportList {
379
    my $opac = shift; # opac (1) vs intranet (0)
379
    my $opac = shift; # opac (1) vs intranet (0)
380
    return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/;
381
380
    my @tabFiles;
382
    my @tabFiles;
381
383
382
    my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') .
384
    my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') .
(-)a/t/db_dependent/XSLT.t (-1 / +23 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
use Test::More tests => 1;
3
4
use t::lib::Mocks;
5
use C4::XSLT;
6
use Koha::Database;
7
8
our $schema = Koha::Database->new->schema;
9
10
# Here we go
11
$schema->storage->txn_begin;
12
subtest 'CustomXSLTExportList: Check export options' => sub {
13
    plan tests => 2;
14
    t::lib::Mocks::mock_preference('OpacExportOptions', 'custom');
15
16
    my $list = C4::XSLT::CustomXSLTExportList(1);
17
    is( @$list>0, 1, 'We expect at least one result: simple export' );
18
19
    t::lib::Mocks::mock_preference('OpacExportOptions', 'dc');
20
    $list = C4::XSLT::CustomXSLTExportList(1);
21
    is( @$list, 0, 'We expect an empty list now' );
22
};
23
$schema->storage->txn_rollback;

Return to bug 17385