Bug 11944: replace uri_escape with uri_escape_utf8 everywhere
[koha.git] / authorities / detail-biblio-search.pl
index 31b5146..eed059c 100755 (executable)
 
 =head1 NAME
 
-etail.pl : script to show an authority in MARC format
+detail-biblio-search.pl - script to show an authority in MARC format
 
 =head1 SYNOPSIS
 
+=cut
 
 =head1 DESCRIPTION
 
@@ -33,8 +34,6 @@ parameters tables.
 
 =head1 FUNCTIONS
 
-=over 2
-
 =cut
 
 
@@ -63,14 +62,16 @@ my $tagslib = &GetTagsLabels(1,$authtypecode);
 
 my $record =GetAuthority($authid);
 # open template
-my ($template, $loggedinuser, $cookie)
-               = get_template_and_user({template_name => "authorities/detail-biblio-search.tmpl",
-                            query => $query,
-                            type => "intranet",
-                            authnotrequired => 0,
-                            flagsrequired => {catalogue => 1},
-                            debug => 1,
-                            });
+my ($template, $loggedinuser, $cookie) = get_template_and_user(
+    {
+        template_name   => "authorities/detail-biblio-search.tt",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { catalogue => 1 },
+        debug           => 1,
+    }
+);
 
 # fill arrays
 my @loop_data =();
@@ -94,7 +95,7 @@ my @fields = $record->fields();
                        my @subf=$field->subfields;
        # loop through each subfield
                        for my $i (0..$#subf) {
-                               $subf[$i][0] = "@" unless $subf[$i][0];
+                               $subf[$i][0] = "@" unless defined $subf[$i][0];
 #                              next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab}  ne $tabloop);
                                next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{hidden});
                                my %subfield_data;