warn "BIBLIOADDSAUTHORITIES: $error";
return (0,0) ;
}
- if ($results && scalar(@$results)==1) {
+ if ( @{$results} == 1) {
my $marcrecord = MARC::File::USMARC::decode($results->[0]);
$field->add_subfields('9'=>$marcrecord->field('001')->data);
$countlinked++;
- } elsif (scalar(@$results)>1) {
+ } elsif (@{$results} > 1) {
#More than One result
#This can comes out of a lack of a subfield.
# my $marcrecord = MARC::File::USMARC::decode($results->[0]);
# $record->field($data->{tagfield})->add_subfields('9'=>$marcrecord->field('001')->data);
- $countlinked++;
+ $countlinked++;
} else {
#There are no results, build authority record, add it to Authorities, get authid and add it to 9
###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode
if (C4::Context->preference("marcflavour") eq "MARC21"){
$template->param(MARC21 => 1);
}
+
+
$template->param(
popup => $mode,
frameworkcode => $frameworkcode,
itemtype => $frameworkcode,
+ borrowernumber => $loggedinuser
);
output_html_with_http_headers $input, $cookie, $template->output;