From: Joe Atzberger Date: Thu, 18 Jun 2009 16:31:32 +0000 (-0500) Subject: Correct POD and misleading variable names from copy/paste laziness X-Git-Tag: n_acq_a_porter~26^2~40 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=b9be34a9d692bdd374f77df2b25b53884a33868b Correct POD and misleading variable names from copy/paste laziness Signed-off-by: Galen Charlton --- diff --git a/C4/Branch.pm b/C4/Branch.pm index 35424d7fcf..a2558d9c76 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -379,21 +379,18 @@ sub GetBranch ($$) { =head2 GetBranchDetail - $branchname = &GetBranchDetail($branchcode); + $branch = &GetBranchDetail($branchcode); -Given the branch code, the function returns the corresponding -branch name for a comprehensive information display +Given the branch code, the function returns a +hashref for the corresponding row in the branches table. =cut sub GetBranchDetail { - my ($branchcode) = @_; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("SELECT * FROM branches WHERE branchcode = ?"); + my ($branchcode) = shift or return; + my $sth = C4::Context->dbh->prepare("SELECT * FROM branches WHERE branchcode = ?"); $sth->execute($branchcode); - my $branchname = $sth->fetchrow_hashref(); - $sth->finish(); - return $branchname; + return $sth->fetchrow_hashref(); } =head2 get_branchinfos_of