X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=patroncards%2Fedit-batch.pl;h=497c01cab90b4a890178c6f6fc5113519eff4219;hb=7d930649065663325de95c3f8ecdbcea3bddb3b5;hp=50bbbf413c1fb1c26e31bce848e70e0f2ec9aea4;hpb=8a3160c870d17c4a4efa7d91afa018afc5b4f442;p=koha.git diff --git a/patroncards/edit-batch.pl b/patroncards/edit-batch.pl index 50bbbf413c..497c01cab9 100755 --- a/patroncards/edit-batch.pl +++ b/patroncards/edit-batch.pl @@ -27,9 +27,8 @@ use autouse 'Data::Dumper' => qw(Dumper); 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::Creators 1.000000; -use C4::Patroncards 1.000000; +use C4::Creators; +use C4::Patroncards; my $cgi = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -60,7 +59,7 @@ my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number'); my $errstr = $cgi->param('error') || ''; -my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); +my $branch_code = C4::Context->userenv->{'branch'}; if ($op eq 'remove') { $batch = C4::Patroncards::Batch->retrieve(batch_id => $batch_id);