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 440-445
sub CustomXSLTExportList {
Link Here
|
440 |
my $opac = shift; # opac (1) vs intranet (0) |
441 |
my $opac = shift; # opac (1) vs intranet (0) |
441 |
return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/; |
442 |
return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/; |
442 |
|
443 |
|
|
|
444 |
# Check the cache first |
445 |
my $cache = Koha::Caches->get_instance; |
446 |
my $key = $opac ? 'CustomXSLTExportListOPAC' : 'CustomXSLTExportListIntra'; |
447 |
my $cached_val = $cache->get_from_cache($key); |
448 |
return $cached_val if $cached_val; |
449 |
|
443 |
my @tabFiles; |
450 |
my @tabFiles; |
444 |
|
451 |
|
445 |
my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') . |
452 |
my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') . |
Lines 476-481
sub CustomXSLTExportList {
Link Here
|
476 |
push @tabFiles, \%row; |
483 |
push @tabFiles, \%row; |
477 |
} |
484 |
} |
478 |
} |
485 |
} |
|
|
486 |
$cache->set_in_cache( $key, [ @tabFiles ] ); |
479 |
return \@tabFiles; |
487 |
return \@tabFiles; |
480 |
} |
488 |
} |
481 |
1; |
489 |
1; |