View | Details | Raw Unified | Return to bug 18904
Collapse All | Expand All

(-)a/authorities/blinddetail-biblio-search.pl (-11 / +6 lines)
Lines 86-105 if ($authid) { Link Here
86
    my $repet = ($query->param('repet') || 1) - 1;
86
    my $repet = ($query->param('repet') || 1) - 1;
87
    my $field = $fields[$repet];
87
    my $field = $fields[$repet];
88
88
89
    # Get all values for each distinct subfield
89
    # Get all values for each distinct subfield and add to subfield loop
90
    my %subfields;
90
    my %done_subfields;
91
    for ( $field->subfields ) {
91
    for ( $field->subfields ) {
92
        next if $_->[0] eq '9'; # $9 will be set with authid value
92
        next if $_->[0] eq '9'; # $9 will be set with authid value
93
        my $letter = $_->[0];
93
        my $letter = $_->[0];
94
        next if defined $subfields{$letter};
94
        $letter ||= '@';
95
        next if defined $done_subfields{$letter};
95
        my @values = $field->subfield($letter);
96
        my @values = $field->subfield($letter);
96
        $subfields{$letter} = \@values;
97
        push @subfield_loop, {marc_subfield => $letter, marc_values => @values };
97
    }
98
        $done_subfields{$letter} = 1;
98
99
    # Add all subfields to the subfield_loop
100
    for( keys %subfields ) {
101
        my $letter = $_ || '@';
102
        push( @subfield_loop, {marc_subfield => $letter, marc_values => $subfields{$_}} );
103
    }
99
    }
104
100
105
    push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship );
101
    push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship );
106
- 

Return to bug 18904