Lines 19-26
Link Here
|
19 |
# with this program; if not, write to the Free Software Foundation, Inc., |
19 |
# with this program; if not, write to the Free Software Foundation, Inc., |
20 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
21 |
|
21 |
|
22 |
use strict; |
22 |
#use strict; |
23 |
use warnings; |
23 |
#use warnings; |
|
|
24 |
use Modern::Perl; |
24 |
BEGIN { |
25 |
BEGIN { |
25 |
# find Koha's Perl modules |
26 |
# find Koha's Perl modules |
26 |
# test carefully before changing this |
27 |
# test carefully before changing this |
Lines 74-80
if($marc_mod_template ne '') {
Link Here
|
74 |
$marc_mod_template_id = $this_template->{'template_id'}; |
75 |
$marc_mod_template_id = $this_template->{'template_id'}; |
75 |
last; |
76 |
last; |
76 |
} |
77 |
} |
|
|
78 |
if($this_template->{'name'} eq $marc_mod_template) { |
79 |
if($marc_mod_template_id < 0) { |
80 |
$marc_mod_template_id = $this_template->{'template_id'}; |
81 |
} else { |
82 |
print "WARNING: MARC modification template name " . |
83 |
"'$marc_mod_template' matches multiple templates. " . |
84 |
"Please fix this issue before proceeding.\n"; |
85 |
exit 1; |
86 |
} |
87 |
} |
77 |
} |
88 |
} |
|
|
89 |
|
78 |
if($marc_mod_template_id < 0) { |
90 |
if($marc_mod_template_id < 0) { |
79 |
die "Can't locate MARC modification template '$marc_mod_template'\n"; |
91 |
die "Can't locate MARC modification template '$marc_mod_template'\n"; |
80 |
} |
92 |
} |
Lines 134-141
sub process_batch {
Link Here
|
134 |
print "... staging MARC records -- please wait\n"; |
146 |
print "... staging MARC records -- please wait\n"; |
135 |
#FIXME: We should really allow the use of marc modification frameworks and to_marc plugins here if possible |
147 |
#FIXME: We should really allow the use of marc modification frameworks and to_marc plugins here if possible |
136 |
my ($batch_id, $num_valid_records, $num_items, @import_errors) = |
148 |
my ($batch_id, $num_valid_records, $num_items, @import_errors) = |
137 |
BatchStageMarcRecords($record_type, $params->{encoding}, $marc_records, $params->{input_file}, $params->{'marc_mod_template_id'}, undef, $params->{batch_comment}, '', $params->{add_items}, 0, |
149 |
BatchStageMarcRecords( |
138 |
100, \&print_progress_and_commit); |
150 |
$record_type, $params->{encoding}, |
|
|
151 |
$marc_records, $params->{input_file}, |
152 |
$params->{'marc_mod_template_id'}, |
153 |
$params->{batch_comment}, '', |
154 |
$params->{add_items}, 0, |
155 |
100, \&print_progress_and_commit); |
139 |
print "... finished staging MARC records\n"; |
156 |
print "... finished staging MARC records\n"; |
140 |
|
157 |
|
141 |
my $num_with_matches = 0; |
158 |
my $num_with_matches = 0; |
142 |
- |
|
|