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