Bug 10527: remove disused routine C4::Branch::get_branch_code_from_name
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 2 Jul 2013 10:56:21 +0000 (12:56 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 12 Jul 2013 20:20:20 +0000 (20:20 +0000)
This routine is not in used and does not make sense. It should not be
used later.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, not references to get_branch_code_from_name found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Branch.pm
labels/label-edit-batch.pl
labels/label-manage.pl
patroncards/edit-batch.pl
patroncards/manage.pl
tools/manage-marc-import.pl

index 5770f7b..b1e66be 100644 (file)
@@ -48,7 +48,7 @@ BEGIN {
                &mybranch
                &GetBranchesCount
        );
-       @EXPORT_OK = qw( &onlymine &mybranch get_branch_code_from_name );
+    @EXPORT_OK = qw( &onlymine &mybranch );
 }
 
 =head1 NAME
@@ -589,15 +589,6 @@ sub CheckBranchCategorycode {
     return $total;
 }
 
-sub get_branch_code_from_name {
-   my @branch_name = @_;
-   my $query = "SELECT branchcode FROM branches WHERE branchname=?;";
-   my $dbh = C4::Context->dbh();
-   my $sth = $dbh->prepare($query);
-   $sth->execute(@branch_name);
-   return $sth->fetchrow_array;
-}
-
 sub GetBranchesCount {
     my $dbh = C4::Context->dbh();
     my $query = "SELECT COUNT(*) AS branches_count FROM branches";
index d534b87..aea4742 100755 (executable)
@@ -26,7 +26,6 @@ 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;
 use C4::Labels;
index 7ef3300..871780d 100755 (executable)
@@ -27,7 +27,6 @@ use Data::Dumper;
 
 use C4::Auth qw(get_template_and_user);
 use C4::Output qw(output_html_with_http_headers);
-use autouse 'C4::Branch' => qw(get_branch_code_from_name);
 use C4::Creators;
 use C4::Labels;
 
index 4897e5f..497c01c 100755 (executable)
@@ -27,7 +27,6 @@ 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;
 use C4::Patroncards;
 
index d052f67..2af8c0e 100755 (executable)
@@ -27,7 +27,6 @@ use autouse 'Data::Dumper' => qw(Dumper);
 
 use C4::Auth qw(get_template_and_user);
 use C4::Output qw(output_html_with_http_headers);
-use autouse 'C4::Branch' => qw(get_branch_code_from_name);
 use C4::Creators;
 use C4::Patroncards;
 use C4::Labels;
index 25f7769..c0584c9 100755 (executable)
@@ -36,7 +36,6 @@ use C4::ImportBatch;
 use C4::Matcher;
 use C4::BackgroundJob;
 use C4::Labels::Batch;
-use C4::Branch qw(get_branch_code_from_name);
 
 my $script_name = "/cgi-bin/koha/tools/manage-marc-import.pl";