X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=labels%2Flabel-edit-batch.pl;h=aea4742034ea461c3c0f6970d22ea328faf91686;hb=21be80ff97c1af68df2d95481ce63d26c74d6bb8;hp=29d2dd3f7b8b9b934992066122c4dc3fda4c75ae;hpb=3195d20440eef3f3836a351a87ab50d7087534ec;p=koha.git diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 29d2dd3f7b..aea4742034 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -26,10 +26,9 @@ use CGI; use C4::Auth qw(get_template_and_user); use C4::Output qw(output_html_with_http_headers); -use C4::Branch qw(get_branch_code_from_name); use C4::Items qw(GetItemnumberFromBarcode); -use C4::Creators 1.000000; -use C4::Labels 1.000000; +use C4::Creators; +use C4::Labels; my $cgi = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -56,12 +55,15 @@ my $display_columns = [ {_label_number => {label => 'Label Number', link_field {select => {label => 'Select', value => '_label_id'}}, ]; my $op = $cgi->param('op') || 'edit'; +my @label_ids; +my @item_numbers; +my $barcode; 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'); +@label_ids = $cgi->param('label_id') if $cgi->param('label_id'); +@item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); +$barcode = $cgi->param('barcode') if $cgi->param('barcode'); -my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); +my $branch_code = C4::Context->userenv->{'branch'}; if ($op eq 'remove') { $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);