Bugzilla – Attachment 49889 Details for
Bug 13705
Move indexation subs in C4::ZebraIndex
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED_OFF] Bug 13705: Prevent a warning in _fix_unimarc_100
SIGNEDOFF-Bug-13705-Prevent-a-warning-in-fixunimar.patch (text/plain), 1.33 KB, created by
Bernardo Gonzalez Kriegel
on 2016-04-05 01:44:24 UTC
(
hide
)
Description:
[SIGNED_OFF] Bug 13705: Prevent a warning in _fix_unimarc_100
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2016-04-05 01:44:24 UTC
Size:
1.33 KB
patch
obsolete
>From 2a30610aba1ac6b5aec0db9df561b06a7346ac11 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 12 Feb 2015 15:23:07 +0100 >Subject: [PATCH] [SIGNED_OFF] Bug 13705: Prevent a warning in _fix_unimarc_100 > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > C4/ZebraIndex.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/ZebraIndex.pm b/C4/ZebraIndex.pm >index 19b5634..20ed64a 100644 >--- a/C4/ZebraIndex.pm >+++ b/C4/ZebraIndex.pm >@@ -379,8 +379,8 @@ sub _fix_unimarc_100 { > my $marc = shift; > > my $string; >- if ( length( $marc->subfield( 100, "a" ) ) == 36 ) { >- $string = $marc->subfield( 100, "a" ); >+ my $string = $marc->subfield(100, 'a'); >+ if ( defined($string) and length($string) == 36 ) { > my $f100 = $marc->field(100); > $marc->delete_field($f100); > } else { >@@ -389,7 +389,9 @@ sub _fix_unimarc_100 { > $string = sprintf( "%-*s", 35, $string ); > } > substr( $string, 22, 6, "frey50" ); >- unless ( length( $marc->subfield( 100, "a" ) ) == 36 ) { >+ >+ my $sf100a = $marc->subfield(100, 'a'); >+ unless ( defined($sf100a) and length($sf100a) == 36 ) { > $marc->delete_field( $marc->field(100) ); > $marc->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) ); > } >-- >1.9.1
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 13705
:
35883
|
35884
|
40060
|
40061
|
49888
| 49889 |
49890
|
49891