Bugzilla – Attachment 49291 Details for
Bug 11592
opac detail scripts do not respect MARC tag visibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Tweak C4/XSLT to delete field when no subfields left.
Tweak-C4XSLT-to-delete-field-when-no-subfields-lef.patch (text/plain), 1.41 KB, created by
Mark Tompsett
on 2016-03-17 23:26:50 UTC
(
hide
)
Description:
Tweak C4/XSLT to delete field when no subfields left.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-03-17 23:26:50 UTC
Size:
1.41 KB
patch
obsolete
>From c63380df03a4e123c6be84a89d3bcb1754f99919 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 9 Mar 2016 19:34:24 -0500 >Subject: [PATCH] Tweak C4/XSLT to delete field when no subfields left. > >https://bugs.koha-community.org/show_bug.cgi?id=11592 >--- > C4/XSLT.pm | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 5622e5f..eedc87f 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -86,13 +86,18 @@ sub transformMARCXML4XSLT { > $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib ) > if $av->{ $tag }->{ $letter }; > push( @new_subfields, $letter, $value ); >- } >- $field ->replace_with( MARC::Field->new( >- $tag, >- $field->indicator(1), >- $field->indicator(2), >- @new_subfields >- ) ); >+ } >+ if (@new_subfields) { >+ $field ->replace_with( MARC::Field->new( >+ $tag, >+ $field->indicator(1), >+ $field->indicator(2), >+ @new_subfields >+ ) ); >+ } >+ else { >+ $record->delete_fields($field); >+ } > } > } > } >-- >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 11592
:
24600
|
24601
|
24611
|
24629
|
24654
|
24655
|
24657
|
24658
|
24659
|
24660
|
24661
|
24662
|
24663
|
24664
|
24875
|
24876
|
24952
|
24953
|
28002
|
28003
|
28477
|
28478
|
28479
|
28480
|
28724
|
31356
|
32382
|
32383
|
33356
|
33357
|
33358
|
33689
|
35855
|
35856
|
35857
|
35858
|
47993
|
47996
|
47997
|
48001
|
49288
|
49289
|
49290
|
49291
|
49612
|
49613
|
49614
|
49615
|
50484
|
50485
|
50486
|
50489
|
50542
|
50550
|
50551
|
50552
|
50553
|
50554
|
51313
|
51314
|
51315
|
51316
|
51317
|
51318
|
51326
|
53440
|
53441
|
53442
|
53443
|
53444
|
55040
|
55041
|
55042
|
55043
|
55044
|
55045
|
55046
|
55184
|
55185