Lines 81-100
if ($authid) {
Link Here
|
81 |
my $repet = ($query->param('repet') || 1) - 1; |
81 |
my $repet = ($query->param('repet') || 1) - 1; |
82 |
my $field = $fields[$repet]; |
82 |
my $field = $fields[$repet]; |
83 |
|
83 |
|
84 |
# Get all values for each distinct subfield |
84 |
# Get all values for each distinct subfield and add to subfield loop |
85 |
my %subfields; |
85 |
my %done_subfields; |
86 |
for ( $field->subfields ) { |
86 |
for ( $field->subfields ) { |
87 |
next if $_->[0] eq '9'; # $9 will be set with authid value |
87 |
next if $_->[0] eq '9'; # $9 will be set with authid value |
88 |
my $letter = $_->[0]; |
88 |
my $letter = $_->[0]; |
89 |
next if defined $subfields{$letter}; |
89 |
$letter ||= '@'; |
|
|
90 |
next if defined $done_subfields{$letter}; |
90 |
my @values = $field->subfield($letter); |
91 |
my @values = $field->subfield($letter); |
91 |
$subfields{$letter} = \@values; |
92 |
push @subfield_loop, {marc_subfield => $letter, marc_values => @values }; |
92 |
} |
93 |
$done_subfields{$letter} = 1; |
93 |
|
|
|
94 |
# Add all subfields to the subfield_loop |
95 |
for( keys %subfields ) { |
96 |
my $letter = $_ || '@'; |
97 |
push( @subfield_loop, {marc_subfield => $letter, marc_values => $subfields{$_}} ); |
98 |
} |
94 |
} |
99 |
|
95 |
|
100 |
push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); |
96 |
push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); |
101 |
- |
|
|