Merge remote-tracking branch 'origin/new/bug_6720'
[koha.git] / C4 / AuthoritiesMarc.pm
index 90c253a..21ebd94 100644 (file)
@@ -354,7 +354,7 @@ sub SearchAuthorities {
                 my $thisauthtype = GetAuthType(GetAuthTypeCode($authid));
                 $newline{authtype}     = defined ($thisauthtype) ?
                                             $thisauthtype->{'authtypetext'} :
-                                            GetAuthType($authtypecode)->{'authtypetext'};
+                                            (GetAuthType($authtypecode) ? $_->{'authtypetext'} : '');
                 $newline{summary}      = $summary;
                 $newline{even}         = $counter % 2;
                 $newline{reported_tag} = $reported_tag;
@@ -971,7 +971,6 @@ sub BuildSummary {
     $thesaurus{'5'}="Lieux";
     $thesaurus{'6'}="Sujets";
     #thesaurus a remplir
-    my @fields = $record->fields();
     my $reported_tag;
 # if the library has a summary defined, use it. Otherwise, build a standard one
 # FIXME - it appears that the summary field in the authority frameworks
@@ -1014,7 +1013,6 @@ sub BuildSummary {
     my @seefrom;
     my @seealso;
     my @otherscript;
-    my @fields = $record->fields();
     if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
 # construct UNIMARC summary, that is quite different from MARC21 one
 # accepted form