Bugzilla – Attachment 20445 Details for
Bug 5202
Merge authority records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 5202 QA follow-up: quiet warnings
PASSED-QA-Bug-5202-QA-follow-up-quiet-warnings.patch (text/plain), 2.60 KB, created by
Katrin Fischer
on 2013-08-18 18:50:39 UTC
(
hide
)
Description:
[PASSED QA] Bug 5202 QA follow-up: quiet warnings
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-08-18 18:50:39 UTC
Size:
2.60 KB
patch
obsolete
>From 4da4c904672b69516b2d48a2534ac25c2172112f Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sun, 14 Jul 2013 17:13:07 -0400 >Subject: [PATCH] [PASSED QA] Bug 5202 QA follow-up: quiet warnings > >Due to massively incorrect data in the default authority frameworks, >we were getting warnings about undefined values and spaces from checking >which tab subfields/fields were displayed in. This patch eliminates those >warnings. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > Koha/Util/MARC.pm | 18 +++++++++++++++--- > authorities/merge.pl | 5 +++++ > 2 files changed, 20 insertions(+), 3 deletions(-) > >diff --git a/Koha/Util/MARC.pm b/Koha/Util/MARC.pm >index 500ba53..5d026ee 100644 >--- a/Koha/Util/MARC.pm >+++ b/Koha/Util/MARC.pm >@@ -62,8 +62,13 @@ sub createMergeHash { > my @subfields = $field->subfields(); > my @subfield_array; > foreach my $subfield (@subfields) { >- if ( !defined($tagslib) >- || $tagslib->{$fieldtag}->{ @$subfield[0] }->{'tab'} >= 0 ) >+ if ( >+ !defined($tagslib) >+ || ( defined $tagslib->{$fieldtag} >+ && defined $tagslib->{$fieldtag}->{ @$subfield[0] } >+ && defined $tagslib->{$fieldtag}->{ @$subfield[0] }->{'tab'} >+ && $tagslib->{$fieldtag}->{ @$subfield[0] }->{'tab'} >= 0 ) >+ ) > { > push @subfield_array, > { >@@ -75,7 +80,14 @@ sub createMergeHash { > > } > >- if ( !defined($tagslib) || @subfield_array ) >+ if ( >+ ( >+ !defined($tagslib) || ( defined $tagslib->{$fieldtag} >+ && defined $tagslib->{$fieldtag}->{'tab'} >+ && $tagslib->{$fieldtag}->{'tab'} >= 0 ) >+ ) >+ && @subfield_array >+ ) > { > push @array, > { >diff --git a/authorities/merge.pl b/authorities/merge.pl >index 0e3fb6d..3d4b881 100755 >--- a/authorities/merge.pl >+++ b/authorities/merge.pl >@@ -114,6 +114,11 @@ else { > > # Getting MARC Structure > my $tagslib = GetTagsLabels( 1, $framework ); >+ foreach my $field ( keys %$tagslib ) { >+ if ( defined $tagslib->{$field}->{'tab'} && $tagslib->{$field}->{'tab'} eq ' ' ) { >+ $tagslib->{$field}->{'tab'} = 0; >+ } >+ } > > my $notreference = > ( $authid[0] == $mergereference ) >-- >1.7.9.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 5202
:
18443
|
18514
|
18516
|
18532
|
19436
|
19634
|
19891
|
19892
|
20099
|
20100
|
20101
|
20440
|
20441
|
20442
|
20443
|
20444
| 20445 |
20446
|
20447
|
20448
|
20449