Lines 130-153
sub get_xslt_sysprefs {
Link Here
|
130 |
} |
130 |
} |
131 |
|
131 |
|
132 |
sub get_xsl_filename { |
132 |
sub get_xsl_filename { |
133 |
my ( $xslsyspref ) = @_; |
133 |
my ( $xslsyspref, $xslfilename ) = @_; |
134 |
|
134 |
|
135 |
my $lang = C4::Languages::getlanguage(); |
135 |
my $lang = C4::Languages::getlanguage(); |
136 |
|
136 |
|
137 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
137 |
$xslfilename ||= C4::Context->preference($xslsyspref) || "default"; |
138 |
|
138 |
|
139 |
if ($xslsyspref eq "XSLTCustomExport") { |
139 |
if ($xslsyspref eq "XSLTCustomExport") { |
140 |
my $dir; |
140 |
my $dir; |
141 |
$dir = C4::Context->config('intrahtdocs') . |
141 |
$dir = C4::Context->config('intrahtdocs') . |
142 |
'/' . C4::Context->preference("template") . |
142 |
'/' . C4::Context->preference("template") . |
143 |
'/' . C4::Languages::getlanguage() . |
143 |
'/' . $lang . |
144 |
'/xslt/biblioexport'; |
144 |
'/xslt/biblioexport'; |
145 |
$xslfilename = $dir . "/" . $xslfilename; |
145 |
$xslfilename = $dir . "/" . $xslfilename; |
146 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
146 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
147 |
my $dir; |
147 |
my $dir; |
148 |
$dir = C4::Context->config('opachtdocs') . |
148 |
$dir = C4::Context->config('opachtdocs') . |
149 |
'/' . C4::Context->preference("opacthemes") . |
149 |
'/' . C4::Context->preference("opacthemes") . |
150 |
'/' . C4::Languages::getlanguage() . |
150 |
'/' . $lang . |
151 |
'/xslt/biblioexport'; |
151 |
'/xslt/biblioexport'; |
152 |
$xslfilename = $dir . "/" . $xslfilename; |
152 |
$xslfilename = $dir . "/" . $xslfilename; |
153 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
153 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
Lines 208-218
sub XSLTParse4Display {
Link Here
|
208 |
my $variables = $params->{xslt_variables}; |
208 |
my $variables = $params->{xslt_variables}; |
209 |
my $items_rs = $params->{items_rs}; |
209 |
my $items_rs = $params->{items_rs}; |
210 |
my $interface = C4::Context->interface; |
210 |
my $interface = C4::Context->interface; |
|
|
211 |
my $xslfilename = $params->{xslfilename}; |
211 |
|
212 |
|
212 |
die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}" |
213 |
die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}" |
213 |
if not defined $params->{xsl_syspref}; |
214 |
if not defined $params->{xsl_syspref}; |
214 |
|
215 |
|
215 |
my $xslfilename = get_xsl_filename( $xslsyspref); |
216 |
$xslfilename = get_xsl_filename( $xslsyspref, $xslfilename); |
216 |
|
217 |
|
217 |
my $frameworkcode = GetFrameworkCode($biblionumber) || ''; |
218 |
my $frameworkcode = GetFrameworkCode($biblionumber) || ''; |
218 |
my $record_processor = Koha::RecordProcessor->new( |
219 |
my $record_processor = Koha::RecordProcessor->new( |