-# load the branches
-my $branches = GetBranches();
-my @branch_loop;
-for my $branch_hash (sort keys %$branches ) {
- my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst'));
- push @branch_loop,
- {
- value => "$branch_hash",
- branchname => $branches->{$branch_hash}->{'branchname'},
- selected => $selected
- };
-}
-$template->param( branchloop => \@branch_loop, "mylibraryfirst"=>C4::Context->preference("SearchMyLibraryFirst"));