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