Bugzilla – Attachment 68680 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: Followup - Retrieve subfield in the order they are stored
Bug-18904-Followup---Retrieve-subfield-in-the-orde.patch (text/plain), 1.93 KB, created by
Nick Clemens (kidclamp)
on 2017-10-27 11:21:48 UTC
(
hide
)
Description:
Bug 18904: Followup - Retrieve subfield in the order they are stored
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-10-27 11:21:48 UTC
Size:
1.93 KB
patch
obsolete
>From e6c5fe12ff91fd3311454604ece707a2864c9f6d 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: Followup - Retrieve subfield in the order they are > stored > >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> >--- > 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 838e4ba..335d670 100755 >--- a/authorities/blinddetail-biblio-search.pl >+++ b/authorities/blinddetail-biblio-search.pl >@@ -81,20 +81,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