View | Details | Raw Unified | Return to bug 10527
Collapse All | Expand All

(-)a/C4/Branch.pm (-10 / +1 lines)
Lines 48-54 BEGIN { Link Here
48
		&mybranch
48
		&mybranch
49
		&GetBranchesCount
49
		&GetBranchesCount
50
	);
50
	);
51
	@EXPORT_OK = qw( &onlymine &mybranch get_branch_code_from_name );
51
    @EXPORT_OK = qw( &onlymine &mybranch );
52
}
52
}
53
53
54
=head1 NAME
54
=head1 NAME
Lines 589-603 sub CheckBranchCategorycode { Link Here
589
    return $total;
589
    return $total;
590
}
590
}
591
591
592
sub get_branch_code_from_name {
593
   my @branch_name = @_;
594
   my $query = "SELECT branchcode FROM branches WHERE branchname=?;";
595
   my $dbh = C4::Context->dbh();
596
   my $sth = $dbh->prepare($query);
597
   $sth->execute(@branch_name);
598
   return $sth->fetchrow_array;
599
}
600
601
sub GetBranchesCount {
592
sub GetBranchesCount {
602
    my $dbh = C4::Context->dbh();
593
    my $dbh = C4::Context->dbh();
603
    my $query = "SELECT COUNT(*) AS branches_count FROM branches";
594
    my $query = "SELECT COUNT(*) AS branches_count FROM branches";
(-)a/labels/label-edit-batch.pl (-1 lines)
Lines 26-32 use CGI; Link Here
26
26
27
use C4::Auth qw(get_template_and_user);
27
use C4::Auth qw(get_template_and_user);
28
use C4::Output qw(output_html_with_http_headers);
28
use C4::Output qw(output_html_with_http_headers);
29
use C4::Branch qw(get_branch_code_from_name);
30
use C4::Items qw(GetItemnumberFromBarcode);
29
use C4::Items qw(GetItemnumberFromBarcode);
31
use C4::Creators;
30
use C4::Creators;
32
use C4::Labels;
31
use C4::Labels;
(-)a/labels/label-manage.pl (-1 lines)
Lines 27-33 use Data::Dumper; Link Here
27
27
28
use C4::Auth qw(get_template_and_user);
28
use C4::Auth qw(get_template_and_user);
29
use C4::Output qw(output_html_with_http_headers);
29
use C4::Output qw(output_html_with_http_headers);
30
use autouse 'C4::Branch' => qw(get_branch_code_from_name);
31
use C4::Creators;
30
use C4::Creators;
32
use C4::Labels;
31
use C4::Labels;
33
32
(-)a/patroncards/edit-batch.pl (-1 lines)
Lines 27-33 use autouse 'Data::Dumper' => qw(Dumper); Link Here
27
27
28
use C4::Auth qw(get_template_and_user);
28
use C4::Auth qw(get_template_and_user);
29
use C4::Output qw(output_html_with_http_headers);
29
use C4::Output qw(output_html_with_http_headers);
30
use C4::Branch qw(get_branch_code_from_name);
31
use C4::Creators;
30
use C4::Creators;
32
use C4::Patroncards;
31
use C4::Patroncards;
33
32
(-)a/patroncards/manage.pl (-1 lines)
Lines 27-33 use autouse 'Data::Dumper' => qw(Dumper); Link Here
27
27
28
use C4::Auth qw(get_template_and_user);
28
use C4::Auth qw(get_template_and_user);
29
use C4::Output qw(output_html_with_http_headers);
29
use C4::Output qw(output_html_with_http_headers);
30
use autouse 'C4::Branch' => qw(get_branch_code_from_name);
31
use C4::Creators;
30
use C4::Creators;
32
use C4::Patroncards;
31
use C4::Patroncards;
33
use C4::Labels;
32
use C4::Labels;
(-)a/tools/manage-marc-import.pl (-2 lines)
Lines 36-42 use C4::ImportBatch; Link Here
36
use C4::Matcher;
36
use C4::Matcher;
37
use C4::BackgroundJob;
37
use C4::BackgroundJob;
38
use C4::Labels::Batch;
38
use C4::Labels::Batch;
39
use C4::Branch qw(get_branch_code_from_name);
40
39
41
my $script_name = "/cgi-bin/koha/tools/manage-marc-import.pl";
40
my $script_name = "/cgi-bin/koha/tools/manage-marc-import.pl";
42
41
43
- 

Return to bug 10527