Bug 32834: Fix cataloguing/value_builder/unimarc_field_121b.pl
[srvgit] / opac / opac-authoritiesdetail.pl
index 1accfa9..e6d41f7 100755 (executable)
@@ -42,7 +42,7 @@ use C4::Auth qw( get_template_and_user );
 use C4::Biblio qw( GetMarcUrls );
 use C4::Context;
 use C4::Output qw( output_html_with_http_headers );
-use C4::AuthoritiesMarc qw( GetAuthority BuildSummary );
+use C4::AuthoritiesMarc qw( GetAuthority BuildSummary GetTagsLabels GenerateHierarchy );
 use CGI qw ( -utf8 );
 use C4::Koha;
 
@@ -98,7 +98,7 @@ $template->param(
 
 # find the marc field/subfield used in biblio by this authority
 if ($show_marc) {
-    my $tagslib = &GetTagsLabels( 0, $authtypecode );
+    my $tagslib = GetTagsLabels( 0, $authtypecode );
     my $sth =
         $dbh->prepare(
                 "select distinct tagfield from marc_subfield_structure where authtypecode=?"
@@ -168,6 +168,12 @@ if ($show_marc) {
 } else {
     my $summary = BuildSummary($record, $authid, $authtypecode);
     $template->{VARS}->{'summary'} = $summary;
+
+    if ( C4::Context->preference('OPACAuthorIdentifiers') ) {
+        my $authority = Koha::Authorities->find($authid);
+        my $identifiers = $authority->get_identifiers;
+        $template->param( author_identifiers => $identifiers );
+    }
 }
 
 output_html_with_http_headers $query, $cookie, $template->output;