Bugzilla – Attachment 35884 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]
Bug 13705: Prevent a warning in _fix_unimarc_100
Bug-13705-Prevent-a-warning-in-fixunimarc100.patch (text/plain), 1.26 KB, created by
Julian Maurice
on 2015-02-13 08:33:46 UTC
(
hide
)
Description:
Bug 13705: Prevent a warning in _fix_unimarc_100
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2015-02-13 08:33:46 UTC
Size:
1.26 KB
patch
obsolete
>From cfff8d39e6c508b64499381cf2cdce05aa8b45a8 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] Bug 13705: Prevent a warning in _fix_unimarc_100 > >--- > 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