Bugzilla – Attachment 46993 Details for
Bug 14377
Indicate that a record is suppressed in staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14377 [QA Followup] - Don't do 942$n processing for UNIMARC
Bug-14377-QA-Followup---Dont-do-942n-processing-fo.patch (text/plain), 3.00 KB, created by
Kyle M Hall (khall)
on 2016-01-20 12:40:26 UTC
(
hide
)
Description:
Bug 14377 [QA Followup] - Don't do 942$n processing for UNIMARC
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-01-20 12:40:26 UTC
Size:
3.00 KB
patch
obsolete
>From 4df8eddcc11f46a37c7c2391089c9bda854f0e4e Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 20 Jan 2016 12:40:22 +0000 >Subject: [PATCH] Bug 14377 [QA Followup] - Don't do 942$n processing for > UNIMARC > >--- > C4/XSLT.pm | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 82fe0fd..f683f01 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -159,6 +159,7 @@ sub _get_best_default_xslt_filename { > sub XSLTParse4Display { > my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_; > my $xslfilename = C4::Context->preference($xslsyspref); >+ my $marcflavour = C4::Context->preference('marcflavour'); > if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { > my $htdocs; > my $theme; >@@ -196,7 +197,7 @@ sub XSLTParse4Display { > # grab the XML, run it through our stylesheet, push it out to the browser > my $record = transformMARCXML4XSLT($biblionumber, $orig_record); > my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); >- my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); >+ my $xmlrecord = $record->as_xml($marcflavour); > my $sysxml = "<sysprefs>\n"; > foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow > DisplayOPACiconsXSLT URLLinkText viewISBD >@@ -218,16 +219,18 @@ sub XSLTParse4Display { > ## Non-syspref variables that need to be computed > $sysxml .= "<OtherVars>"; > >- # Fetch the authorised value description for 942$n ( supressed in opac ) for the value '1' >- # if 942$n is not mapped, the return value will be '1' which means even if the field is not >- # mapped in the framework, we will still get the correct value to compare against >- my $frameworkcode = GetFrameworkCode($biblionumber) || ''; >- my $tagslib = &GetMarcStructure(1,$frameworkcode); >- my $value = GetAuthorisedValueDesc( '942', 'n', '1', '', $tagslib ); >- $sysxml .= "<OtherVar name=\"Field942_1_True_Value\">$value</OtherVar>"; >- >- $sysxml .= "</OtherVars>\n"; >- ## End non-syspref variables that need to be computed >+ unless ( $marcflavour eq 'UNIMARC' ) { >+ # Fetch the authorised value description for 942$n ( supressed in opac ) for the value '1' >+ # if 942$n is not mapped, the return value will be '1' which means even if the field is not >+ # mapped in the framework, we will still get the correct value to compare against >+ my $frameworkcode = GetFrameworkCode($biblionumber) || ''; >+ my $tagslib = &GetMarcStructure(1,$frameworkcode); >+ my $value = GetAuthorisedValueDesc( '942', 'n', '1', '', $tagslib ); >+ $sysxml .= "<OtherVar name=\"Field942_1_True_Value\">$value</OtherVar>"; >+ >+ $sysxml .= "</OtherVars>\n"; >+ ## End non-syspref variables that need to be computed >+ } > > $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; > if ($fixamps) { # We need to correct the HTML entities that Zebra outputs >-- >2.1.4
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 14377
:
42424
|
42436
|
42709
|
43026
|
45564
|
45565
|
45566
|
45568
|
46900
|
46993
|
48657
|
48658
|
48659
|
48660
|
48661
|
49718
|
49719
|
49720
|
49721
|
49722
|
50360
|
50361
|
50720
|
50721
|
50839
|
50842
|
50843
|
50844
|
50881
|
50882
|
50883
|
50884
|
50885
|
50987