Lines 96-102
else {
Link Here
|
96 |
|
96 |
|
97 |
if ($mergereference eq 'breeding') { |
97 |
if ($mergereference eq 'breeding') { |
98 |
$recordObj2 = Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new(); |
98 |
$recordObj2 = Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new(); |
99 |
$mergereference = $authid[0]; |
|
|
100 |
} else { |
99 |
} else { |
101 |
$recordObj2 = Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new(); |
100 |
$recordObj2 = Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new(); |
102 |
} |
101 |
} |
Lines 106-116
else {
Link Here
|
106 |
my $framework; |
105 |
my $framework; |
107 |
if ( $recordObj1->authtype ne $recordObj2->authtype && $mergereference ne 'breeding' ) { |
106 |
if ( $recordObj1->authtype ne $recordObj2->authtype && $mergereference ne 'breeding' ) { |
108 |
$framework = $input->param('frameworkcode') |
107 |
$framework = $input->param('frameworkcode') |
109 |
or push @errors, "Framework not selected."; |
108 |
or push @errors, { code => 'FRAMEWORK_NOT_SELECTED' }; |
110 |
} |
109 |
} |
111 |
else { |
110 |
else { |
112 |
$framework = $recordObj1->authtype; |
111 |
$framework = $recordObj1->authtype; |
113 |
} |
112 |
} |
|
|
113 |
if ($mergereference eq 'breeding') { |
114 |
$mergereference = $authid[0]; |
115 |
} |
114 |
|
116 |
|
115 |
# Getting MARC Structure |
117 |
# Getting MARC Structure |
116 |
my $tagslib = GetTagsLabels( 1, $framework ); |
118 |
my $tagslib = GetTagsLabels( 1, $framework ); |
Lines 173-178
else {
Link Here
|
173 |
} |
175 |
} |
174 |
} |
176 |
} |
175 |
|
177 |
|
|
|
178 |
my $authtypes = getauthtypes; |
179 |
my @authtypesloop; |
180 |
foreach my $thisauthtype ( |
181 |
sort { |
182 |
$authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} |
183 |
} |
184 |
keys %$authtypes |
185 |
) |
186 |
{ |
187 |
my %row = ( |
188 |
value => $thisauthtype, |
189 |
authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, |
190 |
); |
191 |
push @authtypesloop, \%row; |
192 |
} |
193 |
$template->{VARS}->{authtypesloop} = \@authtypesloop; |
194 |
|
176 |
if (@errors) { |
195 |
if (@errors) { |
177 |
|
196 |
|
178 |
# Errors |
197 |
# Errors |