use C4::Koha was loaded only to call C4::Koha::get_infos_of in get_branchinfos_of
the sub get_branchinfos_of was used nowhere
(checked with "grep -R get_branchinfos_of *")
only one reference was made to get_branchinfos_of, in reserve/request.pl, but the sub was not used in fact (maybe removed previously & silently)
This patch removes sub get_branchinfos_of and use C4::Koha in C4::Branch, as well as the reference in request.pl and the t test
The patch doesn't remove use C4::Branch in reserve/request.pl, as it's still used for other subroutines.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
#use warnings; FIXME - Bug 2505
require Exporter;
use C4::Context;
#use warnings; FIXME - Bug 2505
require Exporter;
use C4::Context;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
return $sth->fetchrow_hashref();
}
return $sth->fetchrow_hashref();
}
-=head2 get_branchinfos_of
-
- my $branchinfos_of = get_branchinfos_of(@branchcodes);
-
-Associates a list of branchcodes to the information of the branch, taken in
-branches table.
-
-Returns a href where keys are branchcodes and values are href where keys are
-branch information key.
-
- print 'branchname is ', $branchinfos_of->{$code}->{branchname};
-
-=cut
-
-sub get_branchinfos_of {
- my @branchcodes = @_;
-
- my $query = '
- SELECT branchcode,
- branchname
- FROM branches
- WHERE branchcode IN ('
- . join( ',', map( { "'" . $_ . "'" } @branchcodes ) ) . ')
-';
- return C4::Koha::get_infos_of( $query, 'branchcode' );
-}
-
-
=head2 GetBranchesInCategory
my $branches = GetBranchesInCategory($categorycode);
=head2 GetBranchesInCategory
my $branches = GetBranchesInCategory($categorycode);
use strict;
use warnings;
use strict;
use warnings;
-use C4::Branch; # GetBranches get_branchinfos_of
use CGI;
use List::MoreUtils qw/uniq/;
use Date::Calc qw/Date_to_Days/;
use CGI;
use List::MoreUtils qw/uniq/;
use Date::Calc qw/Date_to_Days/;
GetCategoryTypes
GetBranch
GetBranchDetail
GetCategoryTypes
GetBranch
GetBranchDetail
GetBranchesInCategory
GetBranchInfo
DelBranch
GetBranchesInCategory
GetBranchInfo
DelBranch