use MARC::Record;
use C4::Koha;
+use Koha::Authorities;
use Koha::Authority::Types;
my $query = new CGI;
exit;
}
-my $authtypecode = $record->authtypecode;
+my $authority = Koha::Authorities->find( $authid );
+my $authtypecode = $authority ? $authority->authtypecode : q{};
if ($display_hierarchy){
$template->{VARS}->{'displayhierarchy'} = $display_hierarchy;
$template->{VARS}->{'loophierarchies'} = GenerateHierarchy($authid);
}
-my $count = CountUsage($authid);
+my $count = $authority ? $authority->get_usage_count : 0;
my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypecode'] } );
$template->param(