|
Lines 57-63
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'); |
60 |
my $format = $input->param('format') || 'MARC'; |
| 61 |
my $marc_modification_template = $input->param('marc_modification_template_id'); |
61 |
my $marc_modification_template = $input->param('marc_modification_template_id'); |
| 62 |
|
62 |
|
| 63 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
63 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
|
Lines 93-103
if ($completedJobID) {
Link Here
|
| 93 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromMARCXMLFile( $file, $encoding); |
93 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromMARCXMLFile( $file, $encoding); |
| 94 |
} elsif( $format eq 'MARC' ) { |
94 |
} elsif( $format eq 'MARC' ) { |
| 95 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromISO2709File( $file, $record_type, $encoding ); |
95 |
( $errors, $marcrecords ) = C4::ImportBatch::RecordsFromISO2709File( $file, $record_type, $encoding ); |
| 96 |
} elsif( $format ) { # plugin |
96 |
} else { # plugin based |
| 97 |
$errors = []; |
97 |
$errors = []; |
| 98 |
$marcrecords = C4::ImportBatch::RecordsFromMarcPlugin( $file, $format, $encoding ); |
98 |
$marcrecords = C4::ImportBatch::RecordsFromMarcPlugin( $file, $format, $encoding ); |
| 99 |
} else { |
|
|
| 100 |
die "No format specified"; |
| 101 |
} |
99 |
} |
| 102 |
warn "$filename: " . ( join ',', @$errors ) if @$errors; |
100 |
warn "$filename: " . ( join ',', @$errors ) if @$errors; |
| 103 |
# no need to exit if we have no records (or only errors) here |
101 |
# no need to exit if we have no records (or only errors) here |
| 104 |
- |
|
|