my $index = $query->param('index');
my $tagid = $query->param('tagid');
my $relationship = $query->param('relationship');
-my $authtypecode = Koha::Authorities->find($authid)->authtypecode;
-my $tagslib = &GetTagsLabels( 1, $authtypecode );
-
-my $auth_type = Koha::Authority::Types->find($authtypecode);
-my $record;
-if ($authid) {
- $record = GetAuthority($authid);
-}
# open template
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my @subfield_loop;
my ($indicator1, $indicator2);
if ($authid) {
+ my $authtypecode = Koha::Authorities->find($authid)->authtypecode;
+ my $auth_type = Koha::Authority::Types->find($authtypecode);
+ my $record = GetAuthority($authid);
my @fields = $record->field( $auth_type->auth_tag_to_report );
my $repet = ($query->param('repet') || 1) - 1;
my $field = $fields[$repet];
$indicator2 = defined $thes_mapping{$thes_008_11} ? $thes_mapping{$thes_008_11} : $thes_008_11;
if ($indicator2 eq '7') {
if ($thes_008_11 eq 'r') {
- $subfields{'2'} = ['aat'];
+ push @subfield_loop, { marc_subfield => '2', marc_values => [ 'aat' ] };
} elsif ($thes_008_11 eq 's') {
- $subfields{'2'} = ['sears'];
+ push @subfield_loop, { marc_subfield => '2', marc_values => [ 'sears' ] };
}
}
}