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 419-424
sub CustomXSLTExportList {
Link Here
|
419 |
my $opac = shift; # opac (1) vs intranet (0) |
420 |
my $opac = shift; # opac (1) vs intranet (0) |
420 |
return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/; |
421 |
return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/; |
421 |
|
422 |
|
|
|
423 |
# Check the cache first |
424 |
my $cache = Koha::Caches->get_instance; |
425 |
my $key = $opac ? 'CustomXSLTExportListOPAC' : 'CustomXSLTExportListIntra'; |
426 |
my $cached_val = $cache->get_from_cache($key); |
427 |
return $cached_val if $cached_val; |
428 |
|
422 |
my @tabFiles; |
429 |
my @tabFiles; |
423 |
|
430 |
|
424 |
my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') . |
431 |
my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') . |
Lines 455-460
sub CustomXSLTExportList {
Link Here
|
455 |
push @tabFiles, \%row; |
462 |
push @tabFiles, \%row; |
456 |
} |
463 |
} |
457 |
} |
464 |
} |
|
|
465 |
$cache->set_in_cache( $key, [ @tabFiles ] ); |
458 |
return \@tabFiles; |
466 |
return \@tabFiles; |
459 |
} |
467 |
} |
460 |
1; |
468 |
1; |