Bug 10699: (follow-up) fix parameter test in DeleteBranchTransferLimits()
Need to check for definedness, not Perl truth. Also adds description of the return value to the POD. To test: Run prove -v t/db_dependent/Circulation_transfers.t and verify that the tests pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
88f15db30a
commit
ac11a5d9ff
|
|
@ -3262,15 +3262,17 @@ sub CreateBranchTransferLimit {
|
|||
|
||||
=head2 DeleteBranchTransferLimits
|
||||
|
||||
DeleteBranchTransferLimits($frombranch);
|
||||
my $result = DeleteBranchTransferLimits($frombranch);
|
||||
|
||||
Deletes all the branch transfer limits for one branch
|
||||
Deletes all the library transfer limits for one library. Returns the
|
||||
number of limits deleted, 0e0 if no limits were deleted, or undef if
|
||||
no arguments are supplied.
|
||||
|
||||
=cut
|
||||
|
||||
sub DeleteBranchTransferLimits {
|
||||
my $branch = shift;
|
||||
return unless $branch;
|
||||
return unless defined $branch;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare("DELETE FROM branch_transfer_limits WHERE fromBranch = ?");
|
||||
return $sth->execute($branch);
|
||||
|
|
|
|||
Loading…
Reference in New Issue