View | Details | Raw Unified | Return to bug 5572
Collapse All | Expand All

(-)a/C4/AuthoritiesMarc.pm (-1 / +10 lines)
Lines 1300-1305 sub merge { Link Here
1300
        $oConnection->destroy();    
1300
        $oConnection->destroy();    
1301
    }
1301
    }
1302
    #warn scalar(@reccache)." biblios to update";
1302
    #warn scalar(@reccache)." biblios to update";
1303
    #Get a list of authority controlled subfields
1304
    $sth = $dbh->prepare("select distinct tagsubfield from auth_subfield_structure where authtypecode=? and tagfield=? and tab >=0");
1305
    $sth->execute($authtypecodeto, $auth_tag_to_report_to);
1306
    my @subfields_controlled_by_auth_to;
1307
    while (my ($tagsubfield) = $sth->fetchrow) {
1308
        push @subfields_controlled_by_auth_to, $tagsubfield ;
1309
    }
1303
    # Get All candidate Tags for the change 
1310
    # Get All candidate Tags for the change 
1304
    # (This will reduce the search scope in marc records).
1311
    # (This will reduce the search scope in marc records).
1305
    $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?");
1312
    $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?");
Lines 1332-1337 sub merge { Link Here
1332
                    $field_to->add_subfields($subfield->[0] =>$subfield->[1]);
1339
                    $field_to->add_subfields($subfield->[0] =>$subfield->[1]);
1333
		    $exclude.= $subfield->[0];
1340
		    $exclude.= $subfield->[0];
1334
                }
1341
                }
1342
		foreach my $subt (@subfields_controlled_by_auth_to) {
1343
		    $exclude.= $subt;
1344
		}
1335
		$exclude='['.$exclude.']';
1345
		$exclude='['.$exclude.']';
1336
#		add subfields in $field not included in @record_to
1346
#		add subfields in $field not included in @record_to
1337
		my @restore= grep {$_->[0]!~/$exclude/} $field->subfields();
1347
		my @restore= grep {$_->[0]!~/$exclude/} $field->subfields();
1338
- 

Return to bug 5572