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