X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=tools%2FbatchMod.pl;h=3ba93a8ec4153bd8aacd5a88983b3ff148afeec3;hb=884c8a2b7cceeb13b2478ecd9b941a5ddec6470f;hp=9d59e3a6e8e62a306455889a0715e6f005fe89e3;hpb=1ee7f449be2ba45c2458d2ac571172ecf58752b2;p=koha_fer diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 9d59e3a6e8..3ba93a8ec4 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -39,11 +39,13 @@ my $input = new CGI; my $dbh = C4::Context->dbh; my $error = $input->param('error'); my @itemnumbers = $input->param('itemnumber'); +my $biblionumber = $input->param('biblionumber'); my $op = $input->param('op'); my $del = $input->param('del'); my $del_records = $input->param('del_records'); my $completedJobID = $input->param('completedJobID'); my $runinbackground = $input->param('runinbackground'); +my $src = $input->param('src'); my $template_name; @@ -126,12 +128,10 @@ if ($op eq "action") { # Job size is the number of items we have to process my $job_size = scalar(@itemnumbers); my $job = undef; - my $callback = sub {}; # If we asked for background processing if ($runinbackground) { $job = put_in_background($job_size); - $callback = progress_callback($job, $dbh); } #initializing values for updates @@ -229,6 +229,12 @@ if ($op eq "show"){ @itemnumbers = @contentlist; } } else { + if (defined $biblionumber){ + my @all_items = GetItemsInfo( $biblionumber ); + foreach my $itm (@all_items) { + push @itemnumbers, $itm->{itemnumber}; + } + } if ( my $list=$input->param('barcodelist')){ push my @barcodelist, split(/\s\n/, $list); @@ -453,6 +459,7 @@ if ($op eq "action") { foreach my $error (@errors) { $template->param($error => 1); } +$template->param(src => $src); output_html_with_http_headers $input, $cookie, $template->output; exit; @@ -628,13 +635,5 @@ sub put_in_background { return $job; } -sub progress_callback { - my $job = shift; - my $dbh = shift; - return sub { - my $progress = shift; - $job->progress($progress); - } -}