Merge remote-tracking branch 'origin/new/bug_5347'
[koha.git] / labels / label-create-pdf.pl
index d45b561..6d32c6c 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Labels 1.000000;
 
 my $cgi = new CGI;
 
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
+my ( undef, $loggedinuser, $cookie ) = get_template_and_user({
                                                                     template_name   => "labels/label-home.tt",
                                                                     query           => $cgi,
                                                                     type            => "intranet",
@@ -38,13 +38,15 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
                                                                     debug           => 1,
                                                                     });
 
-
-my $batch_id    = $cgi->param('batch_id') if $cgi->param('batch_id');
+my $batch_id;
+my @label_ids;
+my @item_numbers;
+$batch_id    = $cgi->param('batch_id') if $cgi->param('batch_id');
 my $template_id = $cgi->param('template_id') || undef;
 my $layout_id   = $cgi->param('layout_id') || undef;
 my $start_label = $cgi->param('start_label') || 1;
-my @label_ids   = $cgi->param('label_id') if $cgi->param('label_id');
-my @item_numbers  = $cgi->param('item_number') if $cgi->param('item_number');
+@label_ids   = $cgi->param('label_id') if $cgi->param('label_id');
+@item_numbers  = $cgi->param('item_number') if $cgi->param('item_number');
 
 my $items = undef;