From c188100bf32d5c4d6ee05dfb82502a71be719e0b Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Wed, 17 Dec 2008 21:35:21 -0600 Subject: [PATCH] Allow GetBranchesLoop to intuit IndependantBranches if not specified in argument. Signed-off-by: Galen Charlton --- C4/Branch.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Branch.pm b/C4/Branch.pm index cd81368ad9..9ec155a273 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -133,9 +133,9 @@ sub GetBranches { return ( \%branches ); } -sub GetBranchesLoop ($$) { # since this is what most pages want anyway +sub GetBranchesLoop ($;$) { # since this is what most pages want anyway my $branch = shift or return undef; - my $onlymine = shift || 0; + my $onlymine = shift || C4::Context->preference("IndependantBranches"); my $branches = GetBranches($onlymine); my @loop; foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { -- 2.39.5