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

(-)a/C4/XSLT.pm (+8 lines)
Lines 29-34 use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure ); Link Here
29
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
30
use Koha::ItemTypes;
30
use Koha::ItemTypes;
31
use Koha::RecordProcessor;
31
use Koha::RecordProcessor;
32
use Koha::Caches;
32
use Koha::XSLT::Base;
33
use Koha::XSLT::Base;
33
use Koha::Libraries;
34
use Koha::Libraries;
34
use Koha::Recalls;
35
use Koha::Recalls;
Lines 434-439 sub CustomXSLTExportList { Link Here
434
    my $opac = shift; # opac (1) vs intranet (0)
435
    my $opac = shift; # opac (1) vs intranet (0)
435
    return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/;
436
    return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/;
436
437
438
    # Check the cache first
439
    my $cache = Koha::Caches->get_instance;
440
    my $key = $opac ? 'CustomXSLTExportListOPAC' : 'CustomXSLTExportListIntra';
441
    my $cached_val = $cache->get_from_cache($key);
442
    return $cached_val if $cached_val;
443
437
    my @tabFiles;
444
    my @tabFiles;
438
445
439
    my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') .
446
    my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') .
Lines 470-475 sub CustomXSLTExportList { Link Here
470
            push @tabFiles, \%row;
477
            push @tabFiles, \%row;
471
        }
478
        }
472
    }
479
    }
480
    $cache->set_in_cache( $key, [ @tabFiles ] );
473
    return \@tabFiles;
481
    return \@tabFiles;
474
}
482
}
475
1;
483
1;
(-)a/t/db_dependent/XSLT.t (-2 lines)
Lines 1-4 Link Here
1
original
2
#!/usr/bin/perl
1
#!/usr/bin/perl
3
2
4
# This file is part of Koha.
3
# This file is part of Koha.
5
- 

Return to bug 17385