|
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 488-493
sub CustomXSLTExportList {
Link Here
|
| 488 |
my $opac = shift; # opac (1) vs intranet (0) |
489 |
my $opac = shift; # opac (1) vs intranet (0) |
| 489 |
return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/; |
490 |
return [] if $opac && C4::Context->preference('OpacExportOptions') !~ /custom/; |
| 490 |
|
491 |
|
|
|
492 |
# Check the cache first |
| 493 |
my $cache = Koha::Caches->get_instance; |
| 494 |
my $key = $opac ? 'CustomXSLTExportListOPAC' : 'CustomXSLTExportListIntra'; |
| 495 |
my $cached_val = $cache->get_from_cache($key); |
| 496 |
return $cached_val if $cached_val; |
| 497 |
|
| 491 |
my @tabFiles; |
498 |
my @tabFiles; |
| 492 |
|
499 |
|
| 493 |
my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') . |
500 |
my $dir = C4::Context->config( $opac ? 'opachtdocs' : 'intrahtdocs') . |
|
Lines 524-529
sub CustomXSLTExportList {
Link Here
|
| 524 |
push @tabFiles, \%row; |
531 |
push @tabFiles, \%row; |
| 525 |
} |
532 |
} |
| 526 |
} |
533 |
} |
|
|
534 |
$cache->set_in_cache( $key, [ @tabFiles ] ); |
| 527 |
return \@tabFiles; |
535 |
return \@tabFiles; |
| 528 |
} |
536 |
} |
| 529 |
1; |
537 |
1; |