Bugzilla – Attachment 182230 Details for
Bug 39860
Add a way to allow for additional/custom MARC fields in the record display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39860: Do not XSLT transform the custom content
Bug-39860-Do-not-XSLT-transform-the-custom-content.patch (text/plain), 2.23 KB, created by
Lucas Gass (lukeg)
on 2025-05-09 21:25:58 UTC
(
hide
)
Description:
Bug 39860: Do not XSLT transform the custom content
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-05-09 21:25:58 UTC
Size:
2.23 KB
patch
obsolete
>From 1cc3f298222dbef0db5c32950c39063440f4e98a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 9 May 2025 21:25:34 +0000 >Subject: [PATCH] Bug 39860: Do not XSLT transform the custom content > >--- > C4/XSLT.pm | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 7d7cbfb8794..a961583c15b 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -240,7 +240,7 @@ sub XSLTParse4Display { > $variables->{OpenURLResolverURL} = $biblio->get_openurl; > } > } >- my $extracontentxml = ''; >+ my $extracontent = ''; > > # Check if we should add extra content based on system preference > if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { >@@ -248,8 +248,7 @@ sub XSLTParse4Display { > my $scrubber = C4::Scrubber->new('staff'); > my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); > my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); >- my $cleanxml = $scrubber->scrub($extracontentproccessed); >- $extracontentxml = qq{<extracontent><content>$cleanxml</content></extracontent>}; >+ $extracontent = $scrubber->scrub($extracontentproccessed); > } > > # embed variables >@@ -261,7 +260,7 @@ sub XSLTParse4Display { > $varxml .= "</variables>\n"; > > my $sysxml = get_xslt_sysprefs(); >- $xmlrecord =~ s/\<\/record\>/$itemsxml$extracontentxml$sysxml$varxml\<\/record\>/; >+ $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml\<\/record\>/; > if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs > $xmlrecord =~ s/\&amp;/\&/g; > $xmlrecord =~ s/\&\;lt\;/\<\;/g; >@@ -273,7 +272,10 @@ sub XSLTParse4Display { > #If the xslt should fail, we will return undef (old behavior was > #raw MARC) > #Note that we did set do_not_return_source at object construction >- return $engine->transform( $xmlrecord, $xslfilename ); #file or URL >+ my $transformed_xml = $engine->transform( $xmlrecord, $xslfilename ); >+ >+ my $concatenated_content = $transformed_xml . $extracontent; >+ return $concatenated_content; > } > > =head2 buildKohaItemsNamespace >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39860
:
182054
|
182055
|
182056
|
182057
|
182058
|
182059
|
182230
|
182231
|
182232
|
182233
|
183007
|
183008
|
183009
|
183010
|
183011
|
183035
|
183077
|
183095
|
183774