|
Lines 122-140
if(defined $localcust) { #local customize module
Link Here
|
| 122 |
if($marc_mod_template ne '') { |
122 |
if($marc_mod_template ne '') { |
| 123 |
my @templates = GetModificationTemplates(); |
123 |
my @templates = GetModificationTemplates(); |
| 124 |
foreach my $this_template (@templates) { |
124 |
foreach my $this_template (@templates) { |
| 125 |
if($this_template->{'name'} eq $marc_mod_template) { |
125 |
if($this_template->{'name'} eq $marc_mod_template) { |
| 126 |
if($marc_mod_template_id < 0) { |
126 |
if($marc_mod_template_id < 0) { |
| 127 |
$marc_mod_template_id = $this_template->{'template_id'}; |
127 |
$marc_mod_template_id = $this_template->{'template_id'}; |
| 128 |
} else { |
128 |
} else { |
| 129 |
print "WARNING: MARC modification template name " . |
129 |
print "WARNING: MARC modification template name " . |
| 130 |
"'$marc_mod_template' matches multiple templates. " . |
130 |
"'$marc_mod_template' matches multiple templates. " . |
| 131 |
"Please rename these templates\n"; |
131 |
"Please rename these templates\n"; |
| 132 |
exit 1; |
132 |
exit 1; |
| 133 |
} |
133 |
} |
| 134 |
} |
134 |
} |
| 135 |
} |
135 |
} |
| 136 |
if($marc_mod_template_id < 0) { |
136 |
if($marc_mod_template_id < 0) { |
| 137 |
die "Can't located MARC modification template '$marc_mod_template'\n"; |
137 |
die "Can't located MARC modification template '$marc_mod_template'\n"; |
|
|
138 |
} else { |
| 139 |
print "Records will be modified using MARC modofication template: $marc_mod_template\n" if $verbose; |
| 138 |
} |
140 |
} |
| 139 |
} |
141 |
} |
| 140 |
|
142 |
|
|
Lines 288-294
RECORD: while ( ) {
Link Here
|
| 288 |
} |
290 |
} |
| 289 |
SetUTF8Flag($record); |
291 |
SetUTF8Flag($record); |
| 290 |
if($marc_mod_template_id > 0) { |
292 |
if($marc_mod_template_id > 0) { |
| 291 |
print "Modifying MARC\n"; |
293 |
print "Modifying MARC\n" if $verbose; |
| 292 |
ModifyRecordWithTemplate( $marc_mod_template_id, $record ); |
294 |
ModifyRecordWithTemplate( $marc_mod_template_id, $record ); |
| 293 |
} |
295 |
} |
| 294 |
&$localcust($record) if $localcust; |
296 |
&$localcust($record) if $localcust; |
| 295 |
- |
|
|