Merge remote branch 'kc/new/bug_3072' into kcmaster
[koha.git] / C4 / AuthoritiesMarc.pm
index 68a3fcb..4bbde76 100644 (file)
@@ -648,17 +648,21 @@ sub AddAuthority {
     }
        }
 
-  if (($format eq "UNIMARCAUTH") && (!$record->subfield('100','a'))){
+  if ($format eq "UNIMARCAUTH") {
         $record->leader("     nx  j22             ") unless ($record->leader());
         my $date=POSIX::strftime("%Y%m%d",localtime);    
-        if ($record->field('100')){
+    if (my $string=$record->subfield('100',"a")){
+       $string=~s/fre50/frey50/;
+       $record->field('100')->update('a'=>$string);
+    }
+    elsif ($record->field('100')){
           $record->field('100')->update('a'=>$date."afrey50      ba0");
-        } else {      
-          $record->append_fields(
-            MARC::Field->new('100',' ',' '
-              ,'a'=>$date."afrey50      ba0")
-          );
-        }      
+    } else {      
+        $record->append_fields(
+        MARC::Field->new('100',' ',' '
+            ,'a'=>$date."afrey50      ba0")
+        );
+    }      
   }
   my ($auth_type_tag, $auth_type_subfield) = get_auth_type_location($authtypecode);
   if (!$authid and $format eq "MARC21") {
@@ -1041,7 +1045,7 @@ sub BuildSummary{
             $narrowerterms =~s/-- \n$//;
             $seealso =~s/-- \n$//;
             $see =~s/-- \n$//;
-      $summary = "<b>".$heading."</b><br />".($notes?"$notes <br />":"");
+      $summary = $heading."<br />".($notes?"$notes <br />":"");
       $summary.= '<p><div class="label">TG : '.$broaderterms.'</div></p>' if ($broaderterms);
       $summary.= '<p><div class="label">TS : '.$narrowerterms.'</div></p>' if ($narrowerterms);
       $summary.= '<p><div class="label">TA : '.$seealso.'</div></p>' if ($seealso);