Bugzilla – Attachment 3390 Details for
Bug 5926
Authorities : Fixing Hierarchies : taking any heading subfield
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-5926-Fixing-Hierarchies-taking-any-heading-subfi.patch (text/plain), 1.83 KB, created by
Chris Cormack
on 2011-03-21 22:40:14 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-21 22:40:14 UTC
Size:
1.83 KB
patch
obsolete
>From 0370e44a18257fcd8a41d0f79a01a4e7d12f19e2 Mon Sep 17 00:00:00 2001 >From: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> >Date: Tue, 18 May 2010 14:35:04 +0200 >Subject: [PATCH] Bug 5926 : Fixing Hierarchies : taking any heading subfield > >Conflicts solved: > > C4/AuthoritiesMarc.pm >--- > C4/AuthoritiesMarc.pm | 13 +++++++++---- > 1 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index f3cc948..e3bf50e 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1181,16 +1181,17 @@ sub BuildUnimarcHierarchy{ > my $class = shift @_; > my $authid_constructed = shift @_; > return undef unless ($record); >- my $authid=$record->subfield('2..','3'); >+ my $authid=$record->field('001')->data(); > my %cell; > my $parents=""; my $children=""; > my (@loopparents,@loopchildren); >- foreach my $field ($record->field('550')){ >+ foreach my $field ($record->field('5..')){ >+ my $subfauthid=_get_authid_subfield($field); > if ($field->subfield('5') && $field->subfield('a')){ > if ($field->subfield('5') eq 'h'){ >- push @loopchildren, { "childauthid"=>$field->subfield('3'),"childvalue"=>$field->subfield('a')}; >+ push @loopchildren, { "childauthid"=>$subfauthid,"childvalue"=>$field->subfield('a')}; > }elsif ($field->subfield('5') eq 'g'){ >- push @loopparents, { "parentauthid"=>$field->subfield('3'),"parentvalue"=>$field->subfield('a')}; >+ push @loopparents, { "parentauthid"=>$subfauthid,"parentvalue"=>$field->subfield('a')}; > } > # brothers could get in there with an else > } >@@ -1206,6 +1207,10 @@ sub BuildUnimarcHierarchy{ > return \%cell; > } > >+sub _get_authid_subfield{ >+ my ($field)=@_; >+ return $field->subfield('9')||$field->subfield('3'); >+} > =head2 GetHeaderAuthority > > $ref= &GetHeaderAuthority( $authid) >-- >1.7.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 5926
: 3390