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