[Koha-patches] [PATCH] Allow GetBranchesLoop to intuit IndependantBranches if not specified in argument.

Joe Atzberger joe.atzberger at liblime.com
Thu Dec 18 04:35:21 CET 2008


---
 C4/Branch.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/Branch.pm b/C4/Branch.pm
index aa58cbd..60e33ce 100644
--- a/C4/Branch.pm
+++ b/C4/Branch.pm
@@ -131,9 +131,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) {
-- 
1.5.5.GIT




More information about the Koha-patches mailing list