Bug 5391 - can't add multiples to batch
authorChris Nighswonger <cnighswonger@foundations.edu>
Fri, 12 Nov 2010 19:56:25 +0000 (14:56 -0500)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Tue, 14 Dec 2010 03:34:02 +0000 (22:34 -0500)
This was due to the use of an OR which seems to have caused the
param method to be called in a scalar context thus returning only
the first of multiple repeated cgi params.

This patch retains the intent of the OR by replacing it with a
conditional.

Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
labels/label-edit-batch.pl

index 94d56b4..559b78c 100755 (executable)
@@ -58,6 +58,7 @@ my $op = $cgi->param('op') || 'edit';
 my $batch_id = $cgi->param('element_id') || $cgi->param('batch_id') || undef;
 my @label_ids = $cgi->param('label_id') if $cgi->param('label_id');
 my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
+my $barcode = $cgi->param('barcode') if $cgi->param('barcode');
 
 my $branch_code = get_branch_code_from_name($template->param('LoginBranchname'));