);
my $authid = $query->param('authid');
+my $record = GetAuthority( $authid );
+if ( ! $record ) {
+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
+ exit;
+}
+
my $authtypecode = &GetAuthTypeCode( $authid );
-my $record;
if ($display_hierarchy){
my $trees=BuildUnimarcHierarchies($authid);
my @trees = split /;/,$trees ;
foreach my $element (@tree){
my $cell;
my $elementdata = GetAuthority($element);
- $record= $elementdata if ($authid==$element);
push @loophierarchy, BuildUnimarcHierarchy($elementdata,"child".$cnt, $authid);
$cnt++;
}
'loophierarchies' =>\@loophierarchies,
);
}
-else {
- $record = GetAuthority( $authid );
-}
my $count = CountUsage($authid);