Bugzilla – Attachment 73853 Details for
Bug 18904
Advanced editor - Rancor - Add authority support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18904: (follow-up) Retrieve subfield in the order they are stored
Bug-18904-follow-up-Retrieve-subfield-in-the-order.patch (text/plain), 2.03 KB, created by
Marcel de Rooy
on 2018-04-09 11:15:34 UTC
(
hide
)
Description:
Bug 18904: (follow-up) Retrieve subfield in the order they are stored
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-04-09 11:15:34 UTC
Size:
2.03 KB
patch
obsolete
>From 1c45c3f32733d8b794b3c71d2890a50ce543cbc3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 20 Jul 2017 10:23:49 +0000 >Subject: [PATCH] Bug 18904: (follow-up) Retrieve subfield in the order they > are stored >Content-Type: text/plain; charset=utf-8 > >Use subfields in the order they are stored. > >This patch removes use of an intermediate hash for storing values. Order >of subfields as obtained from authority is now preserved. > >Also removes useless code that was intended to set $2 subfields > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > authorities/blinddetail-biblio-search.pl | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > >diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl >index 13f5dc6..0afeb96 100755 >--- a/authorities/blinddetail-biblio-search.pl >+++ b/authorities/blinddetail-biblio-search.pl >@@ -86,20 +86,16 @@ if ($authid) { > my $repet = ($query->param('repet') || 1) - 1; > my $field = $fields[$repet]; > >- # Get all values for each distinct subfield >- my %subfields; >+ # Get all values for each distinct subfield and add to subfield loop >+ my %done_subfields; > for ( $field->subfields ) { > next if $_->[0] eq '9'; # $9 will be set with authid value > my $letter = $_->[0]; >- next if defined $subfields{$letter}; >+ $letter ||= '@'; >+ next if defined $done_subfields{$letter}; > my @values = $field->subfield($letter); >- $subfields{$letter} = \@values; >- } >- >- # Add all subfields to the subfield_loop >- for( keys %subfields ) { >- my $letter = $_ || '@'; >- push( @subfield_loop, {marc_subfield => $letter, marc_values => $subfields{$_}} ); >+ push @subfield_loop, {marc_subfield => $letter, marc_values => @values }; >+ $done_subfields{$letter} = 1; > } > > push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); >-- >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 18904
:
64859
|
64860
|
65144
|
65145
|
65863
|
65864
|
65865
|
65866
|
68678
|
68679
|
68680
|
68681
|
71747
|
71748
|
71749
|
71750
|
71751
|
72920
|
73693
|
73694
|
73695
|
73696
|
73697
|
73766
|
73767
|
73768
|
73769
|
73770
|
73771
|
73851
|
73852
| 73853 |
73854
|
73855
|
73856
|
73857
|
74023
|
74055