X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fstage-marc-import.pl;h=8d6ab1a00e6960a3630a21cfa4c7da9343923377;hb=e524ab07c8a0b4b812fb2afe6b95795e5a15f276;hp=fbb53656993384c7466a380f749808c8124f0850;hpb=23de370b2d73babe7378d419f59e3af7a632e394;p=koha_fer diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl index fbb5365699..8d6ab1a00e 100755 --- a/tools/stage-marc-import.pl +++ b/tools/stage-marc-import.pl @@ -41,6 +41,7 @@ use C4::ImportBatch; use C4::Matcher; use C4::UploadedFile; use C4::BackgroundJob; +use C4::MarcModificationTemplates; my $input = new CGI; my $dbh = C4::Context->dbh; @@ -57,6 +58,8 @@ my $item_action = $input->param('item_action'); my $comments = $input->param('comments'); my $record_type = $input->param('record_type'); my $encoding = $input->param('encoding'); +my $marc_modification_template = $input->param('marc_modification_template_id'); + my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "tools/stage-marc-import.tmpl", query => $input, @@ -131,7 +134,7 @@ if ($completedJobID) { } # FIXME branch code - my ($batch_id, $num_valid, $num_items, @import_errors) = BatchStageMarcRecords($record_type, $encoding, $marcrecord, $filename, $comments, '', $parse_items, 0, 50, staging_progress_callback($job, $dbh)); + my ($batch_id, $num_valid, $num_items, @import_errors) = BatchStageMarcRecords($record_type, $encoding, $marcrecord, $filename, $marc_modification_template, $comments, '', $parse_items, 0, 50, staging_progress_callback($job, $dbh)); $dbh->commit(); @@ -180,6 +183,8 @@ if ($completedJobID) { matcher_code => $matcher_code, import_batch_id => $batch_id ); + + } } else { @@ -189,6 +194,10 @@ if ($completedJobID) { } my @matchers = C4::Matcher::GetMatcherList(); $template->param(available_matchers => \@matchers); + + my @templates = GetModificationTemplates(); + $template->param( MarcModificationTemplatesLoop => \@templates ); + } output_html_with_http_headers $input, $cookie, $template->output;