Lines 57-64
my $item_action = $input->param('item_action');
Link Here
|
57 |
my $comments = $input->param('comments'); |
57 |
my $comments = $input->param('comments'); |
58 |
my $record_type = $input->param('record_type'); |
58 |
my $record_type = $input->param('record_type'); |
59 |
my $encoding = $input->param('encoding') || 'UTF-8'; |
59 |
my $encoding = $input->param('encoding') || 'UTF-8'; |
60 |
my $format = $input->param('format') || 'ISO2709'; |
60 |
my $format = $input->param('format'); |
61 |
my $to_marc_plugin = $input->param('to_marc_plugin'); |
|
|
62 |
my $marc_modification_template = $input->param('marc_modification_template_id'); |
61 |
my $marc_modification_template = $input->param('marc_modification_template_id'); |
63 |
|
62 |
|
64 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
63 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
Lines 90-99
if ($completedJobID) {
Link Here
|
90 |
my $filename = $upload->filename; |
89 |
my $filename = $upload->filename; |
91 |
|
90 |
|
92 |
my ( $errors, $marcrecords ); |
91 |
my ( $errors, $marcrecords ); |
|
|
92 |
warn "L92 $format"; |
93 |
if( $format eq 'MARCXML' ) { |
93 |
if( $format eq 'MARCXML' ) { |
94 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromMARCXMLFile( $file, $encoding); |
94 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromMARCXMLFile( $file, $encoding); |
95 |
} else { |
95 |
} elsif( $format eq 'MARC' ) { |
96 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromISO2709File( $file, $record_type, $encoding ); |
96 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromISO2709File( $file, $record_type, $encoding ); |
|
|
97 |
} elsif( $format ) { # plugin |
98 |
$errors = []; |
99 |
$marcrecords = C4::ImportBatch::RecordsFromMarcPlugin( $file, $format, $encoding ); |
100 |
} else { |
101 |
die "No format specified"; |
97 |
} |
102 |
} |
98 |
warn "$filename: " . ( join ',', @$errors ) if @$errors; |
103 |
warn "$filename: " . ( join ',', @$errors ) if @$errors; |
99 |
# no need to exit if we have no records (or only errors) here |
104 |
# no need to exit if we have no records (or only errors) here |
Lines 141-147
if ($completedJobID) {
Link Here
|
141 |
BatchStageMarcRecords( |
146 |
BatchStageMarcRecords( |
142 |
$record_type, $encoding, |
147 |
$record_type, $encoding, |
143 |
$marcrecords, $filename, |
148 |
$marcrecords, $filename, |
144 |
$to_marc_plugin, $marc_modification_template, |
149 |
undef, $marc_modification_template, |
145 |
$comments, '', |
150 |
$comments, '', |
146 |
$parse_items, 0, |
151 |
$parse_items, 0, |
147 |
50, staging_progress_callback( $job, $dbh ) |
152 |
50, staging_progress_callback( $job, $dbh ) |
148 |
- |
|
|