|
Lines 141-164
Missing POD for get_xsl_filename.
Link Here
|
| 141 |
=cut |
141 |
=cut |
| 142 |
|
142 |
|
| 143 |
sub get_xsl_filename { |
143 |
sub get_xsl_filename { |
| 144 |
my ($xslsyspref) = @_; |
144 |
my ($xslsyspref, $xslfilename) = @_; |
| 145 |
|
145 |
|
| 146 |
my $lang = C4::Languages::getlanguage(); |
146 |
my $lang = C4::Languages::getlanguage(); |
| 147 |
|
147 |
|
| 148 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
148 |
my $xslfilename ||= C4::Context->preference($xslsyspref) || "default"; |
| 149 |
|
149 |
|
| 150 |
if ($xslsyspref eq "XSLTCustomExport") { |
150 |
if ($xslsyspref eq "XSLTCustomExport") { |
| 151 |
my $dir; |
151 |
my $dir; |
| 152 |
$dir = C4::Context->config('intrahtdocs') . |
152 |
$dir = C4::Context->config('intrahtdocs') . |
| 153 |
'/' . C4::Context->preference("template") . |
153 |
'/' . C4::Context->preference("template") . |
| 154 |
'/' . C4::Languages::getlanguage() . |
154 |
'/' . $lang . |
| 155 |
'/xslt/biblioexport'; |
155 |
'/xslt/biblioexport'; |
| 156 |
$xslfilename = $dir . "/" . $xslfilename; |
156 |
$xslfilename = $dir . "/" . $xslfilename; |
| 157 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
157 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
| 158 |
my $dir; |
158 |
my $dir; |
| 159 |
$dir = C4::Context->config('opachtdocs') . |
159 |
$dir = C4::Context->config('opachtdocs') . |
| 160 |
'/' . C4::Context->preference("opacthemes") . |
160 |
'/' . C4::Context->preference("opacthemes") . |
| 161 |
'/' . C4::Languages::getlanguage() . |
161 |
'/' . $lang . |
| 162 |
'/xslt/biblioexport'; |
162 |
'/xslt/biblioexport'; |
| 163 |
$xslfilename = $dir . "/" . $xslfilename; |
163 |
$xslfilename = $dir . "/" . $xslfilename; |
| 164 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
164 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
|
Lines 215-225
sub XSLTParse4Display {
Link Here
|
| 215 |
my $variables = $params->{xslt_variables}; |
215 |
my $variables = $params->{xslt_variables}; |
| 216 |
my $items_rs = $params->{items_rs}; |
216 |
my $items_rs = $params->{items_rs}; |
| 217 |
my $interface = C4::Context->interface; |
217 |
my $interface = C4::Context->interface; |
|
|
218 |
my $xslfilename = $params->{xslfilename}; |
| 218 |
|
219 |
|
| 219 |
die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}" |
220 |
die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}" |
| 220 |
if not defined $params->{xsl_syspref}; |
221 |
if not defined $params->{xsl_syspref}; |
| 221 |
|
222 |
|
| 222 |
my $xslfilename = get_xsl_filename($xslsyspref); |
223 |
my $xslfilename = get_xsl_filename($xslsyspref, $xslfilename); |
| 223 |
|
224 |
|
| 224 |
my $frameworkcode = GetFrameworkCode($biblionumber) || ''; |
225 |
my $frameworkcode = GetFrameworkCode($biblionumber) || ''; |
| 225 |
my $record_processor = Koha::RecordProcessor->new( |
226 |
my $record_processor = Koha::RecordProcessor->new( |