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