Lines 32-37
use Koha::RecordProcessor;
Link Here
|
32 |
use Koha::XSLT::Base; |
32 |
use Koha::XSLT::Base; |
33 |
use Koha::Libraries; |
33 |
use Koha::Libraries; |
34 |
use Koha::Recalls; |
34 |
use Koha::Recalls; |
|
|
35 |
use Koha::TemplateUtils qw( process_tt ); |
36 |
use C4::Scrubber; |
35 |
|
37 |
|
36 |
my $engine; #XSLT Handler object |
38 |
my $engine; #XSLT Handler object |
37 |
|
39 |
|
Lines 238-243
sub XSLTParse4Display {
Link Here
|
238 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
240 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
239 |
} |
241 |
} |
240 |
} |
242 |
} |
|
|
243 |
my $extracontent = ''; |
244 |
|
245 |
# Check if we should add extra content based on system preference |
246 |
if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { |
247 |
|
248 |
my $scrubber = C4::Scrubber->new('staff'); |
249 |
my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); |
250 |
my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); |
251 |
$extracontent = $scrubber->scrub($extracontentproccessed); |
252 |
} |
241 |
|
253 |
|
242 |
# embed variables |
254 |
# embed variables |
243 |
my $varxml = "<variables>\n"; |
255 |
my $varxml = "<variables>\n"; |
Lines 260-266
sub XSLTParse4Display {
Link Here
|
260 |
#If the xslt should fail, we will return undef (old behavior was |
272 |
#If the xslt should fail, we will return undef (old behavior was |
261 |
#raw MARC) |
273 |
#raw MARC) |
262 |
#Note that we did set do_not_return_source at object construction |
274 |
#Note that we did set do_not_return_source at object construction |
263 |
return $engine->transform( $xmlrecord, $xslfilename ); #file or URL |
275 |
my $transformed_xml = $engine->transform( $xmlrecord, $xslfilename ); |
|
|
276 |
|
277 |
my $concatenated_content = $transformed_xml . $extracontent; |
278 |
return $concatenated_content; |
264 |
} |
279 |
} |
265 |
|
280 |
|
266 |
=head2 buildKohaItemsNamespace |
281 |
=head2 buildKohaItemsNamespace |