Bug 31179: Don't copy invisible subfields when duplicating items
[srvgit] / opac / opac-authoritiesdetail.pl
index b35df75..ed0a1c7 100755 (executable)
@@ -38,19 +38,18 @@ parameters tables.
 
 use Modern::Perl;
 
-use C4::AuthoritiesMarc;
-use C4::Auth;
-use C4::Biblio qw(GetMarcUrls);
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcUrls );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
+use C4::AuthoritiesMarc qw( GetAuthority BuildSummary GetTagsLabels GenerateHierarchy );
 use CGI qw ( -utf8 );
-use MARC::Record;
 use C4::Koha;
 
 use Koha::Authorities;
 use Koha::Authority::Types;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
@@ -65,7 +64,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $query,
         type            => "opac",
         authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
-        debug           => 1,
     }
 );
 
@@ -100,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=?"