Bugzilla – Attachment 16393 Details for
Bug 9740
using XSLT modifies record authorized values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9740: using XSLT modifies record authorized values
Bug-9740-using-XSLT-modifies-record-authorized-val.patch (text/plain), 2.28 KB, created by
Paul Poulain
on 2013-03-19 13:55:43 UTC
(
hide
)
Description:
Bug 9740: using XSLT modifies record authorized values
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2013-03-19 13:55:43 UTC
Size:
2.28 KB
patch
obsolete
>From 44be6bc94b7bbe15b21e538d104d2a58671a1a31 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 1 Mar 2013 16:24:27 +0100 >Subject: [PATCH] Bug 9740: using XSLT modifies record authorized values > >When using XSLT display, in detail.pl, the record (MARC::Record) is get from database. >This record is given to XSLTParse4Display() to transform into HTML using XSLT. >This method uses transformMARCXML4XSLT() to replace in record authorized values code by there description. >The bug is that this change is made on original record and remains in the rest of the script detail.pl. > >This patch adds a clonning operation into transformMARCXML4XSLT. > >Test plan : >- Activate XSLT display in intranet details XSLTDetailsDisplay syspref >- Create a new authorized value categorie : ie "AUTHVAL" >- Add a new authorized value and description : ie "VAL" and "Description for VAL" >- Edit default framework >- Edit a note subfield : 3xx for UNIMARC, 5xx for others) : ie 326$a >- Set authorized value "AUTHVAL" for this subfield >- Edit a biblio with default framework >- Choose authorized value for speficied subfield : ie "Description for VAL" for 326$a >- Go to detail page and click on "Descriptions" tab >=> Whitout this patch you see authorized value description : ie "Description for VAL" >=> Whith this patch you see authorized value code : ie "VAL" >"Descriptions" tab is set in detail.pl with C4::GetMarcNotes($record,$marcflavour) after the call to XSLTParse4Display($record), so test plan confirms that XSLTParse4Display() modifies or not $record. > >Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> >--- > C4/XSLT.pm | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 76a424b..d14fc39 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -177,7 +177,8 @@ sub XSLTParse4Display { > } > > # grab the XML, run it through our stylesheet, push it out to the browser >- my $record = transformMARCXML4XSLT($biblionumber, $orig_record); >+ my $record = $orig_record->clone(); # work on a copy >+ $record = transformMARCXML4XSLT($biblionumber, $record); > #return $record->as_formatted(); > my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); > my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); >-- >1.7.2.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 9740
:
15803
| 16393