Lines 191-197
sub get_xslt_sysprefs {
Link Here
|
191 |
} |
191 |
} |
192 |
|
192 |
|
193 |
sub XSLTParse4Display { |
193 |
sub XSLTParse4Display { |
194 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang , $opac) = @_; |
194 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang) = @_; |
195 |
|
195 |
|
196 |
$sysxml ||= C4::Context->preference($xslsyspref); |
196 |
$sysxml ||= C4::Context->preference($xslsyspref); |
197 |
$xslfilename ||= C4::Context->preference($xslsyspref); |
197 |
$xslfilename ||= C4::Context->preference($xslsyspref); |
Lines 199-215
sub XSLTParse4Display {
Link Here
|
199 |
|
199 |
|
200 |
if ($xslsyspref eq "XSLTCustomExport") { |
200 |
if ($xslsyspref eq "XSLTCustomExport") { |
201 |
my $dir; |
201 |
my $dir; |
202 |
if ($opac) { |
202 |
$dir = C4::Context->config('intrahtdocs') . |
203 |
$dir = C4::Context->config('opachtdocs') . |
203 |
'/' . C4::Context->preference("template") . |
204 |
'/' . C4::Context->preference("opacthemes") . |
204 |
'/' . C4::Languages::getlanguage() . |
205 |
'/' . C4::Languages::getlanguage() . |
205 |
'/xslt/biblioexport'; |
206 |
'/xslt/biblioexport'; |
206 |
$xslfilename = $dir . "/" . $xslfilename; |
207 |
} else { |
207 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
208 |
$dir = C4::Context->config('intrahtdocs') . |
208 |
my $dir; |
209 |
'/' . C4::Context->preference("template") . |
209 |
$dir = C4::Context->config('opachtdocs') . |
210 |
'/' . C4::Languages::getlanguage() . |
210 |
'/' . C4::Context->preference("opacthemes") . |
211 |
'/xslt/biblioexport'; |
211 |
'/' . C4::Languages::getlanguage() . |
212 |
} |
212 |
'/xslt/biblioexport'; |
213 |
$xslfilename = $dir . "/" . $xslfilename; |
213 |
$xslfilename = $dir . "/" . $xslfilename; |
214 |
} elsif( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
214 |
} elsif( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
215 |
my $htdocs; |
215 |
my $htdocs; |
Lines 389-395
sub CustomXSLTExportList {
Link Here
|
389 |
(my $text = $file) =~ s/.*\///g; |
389 |
(my $text = $file) =~ s/.*\///g; |
390 |
|
390 |
|
391 |
## Get title of the option |
391 |
## Get title of the option |
392 |
my $dom = XML::LibXML->load_xml( location => $file ); |
392 |
my $dom; |
|
|
393 |
eval { $dom = XML::LibXML->load_xml( location => $file ); }; |
394 |
next unless $dom; |
395 |
|
393 |
my $node = $dom->documentElement(); |
396 |
my $node = $dom->documentElement(); |
394 |
my $title = $node->{"title"}; |
397 |
my $title = $node->{"title"}; |
395 |
($title = $text) =~ s/\.xsl// unless defined $title; |
398 |
($title = $text) =~ s/\.xsl// unless defined $title; |