Bug 3319 Followup: Fix compatibility with fix for bug 4945
authorIan Walls <ian.walls@bywatersolutions.com>
Sat, 19 Feb 2011 10:38:32 +0000 (05:38 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 28 Feb 2011 09:52:05 +0000 (22:52 +1300)
The fix for 3319 overwrote the @branchloop variable with output from GetBranchesLoop,
which forces a selected branch.  Removing the extra call, and just measuring the size of
@branchloop as it was build, plus some dereferencing, fixes the issue.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
members/members-home.pl

index db8be4a..2c6d602 100755 (executable)
@@ -66,12 +66,12 @@ foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname}
 my @categories;
 my $no_categories;
 my $no_add = 0;
-my $branchloop = (defined $branch?GetBranchesLoop($branch):GetBranchesLoop());
-if(scalar(@$branchloop) < 1){
+if(scalar(@branchloop) < 1){
     $no_add = 1;
     $template->param(no_branches => 1);
-} else {
-    $template->param(branchloop=>\@$branchloop);
+} 
+else {
+    $template->param(branchloop=>\@branchloop);
 }
 
 @categories=C4::Category->all;