Bug 5391 - can't add multiples to batch

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>
This commit is contained in:
Chris Nighswonger 2010-11-12 14:56:25 -05:00 committed by Chris Cormack
parent 289eb6caa5
commit 0448a6d014
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ my $display_columns = [ {_label_number => {label => 'Label Number', link_field
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') || ();
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'));