| Lines 1431-1436
          sub merge {
      
      
        Link Here | 
        
          | 1431 |     } | 1431 |     } | 
        
          | 1432 |     $oResult->destroy(); | 1432 |     $oResult->destroy(); | 
        
          | 1433 |     #warn scalar(@reccache)." biblios to update"; | 1433 |     #warn scalar(@reccache)." biblios to update"; | 
            
              |  |  | 1434 |     #Get a list of authority controlled subfields | 
            
              | 1435 |     $sth = $dbh->prepare("select distinct tagsubfield from auth_subfield_structure where authtypecode=? and tagfield=? and tab >=0 and hidden = 0"); | 
            
              | 1436 |     $sth->execute($authtypecodeto, $auth_tag_to_report_to); | 
            
              | 1437 |     my @subfields_controlled_by_auth_to; | 
            
              | 1438 |     while (my ($tagsubfield) = $sth->fetchrow) { | 
            
              | 1439 |         push @subfields_controlled_by_auth_to, $tagsubfield ; | 
            
              | 1440 |     } | 
        
          | 1434 |     # Get All candidate Tags for the change  | 1441 |     # Get All candidate Tags for the change  | 
        
          | 1435 |     # (This will reduce the search scope in marc records). | 1442 |     # (This will reduce the search scope in marc records). | 
        
          | 1436 |     $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?"); | 1443 |     $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?"); | 
  
    | Lines 1463-1468
          sub merge {
      
      
        Link Here | 
        
          | 1463 |                     $field_to->add_subfields($subfield->[0] =>$subfield->[1]); | 1470 |                     $field_to->add_subfields($subfield->[0] =>$subfield->[1]); | 
        
          | 1464 | 		    $exclude.= $subfield->[0]; | 1471 | 		    $exclude.= $subfield->[0]; | 
        
          | 1465 |                 } | 1472 |                 } | 
            
              |  |  | 1473 | 		foreach my $subt (@subfields_controlled_by_auth_to) { | 
            
              | 1474 | 		    $exclude.= $subt; | 
            
              | 1475 | 		} | 
        
          | 1466 | 		$exclude='['.$exclude.']'; | 1476 | 		$exclude='['.$exclude.']'; | 
        
          | 1467 | #		add subfields in $field not included in @record_to | 1477 | #		add subfields in $field not included in @record_to | 
        
          | 1468 | 		my @restore= grep {$_->[0]!~/$exclude/} $field->subfields(); | 1478 | 		my @restore= grep {$_->[0]!~/$exclude/} $field->subfields(); | 
            
              | 1469 | -  |  |  |