Bug 15758: Koha::Libraries - Remove GetBranches
[srvgit] / opac / opac-user.pl
index 6b1d98e..7eb8749 100755 (executable)
@@ -33,7 +33,6 @@ use C4::Output;
 use C4::Biblio;
 use C4::Items;
 use C4::Letters;
-use C4::Branch; # GetBranches
 use Koha::DateUtils;
 use Koha::Holds;
 use Koha::Database;
@@ -99,6 +98,8 @@ if ($debar) {
     if ( $debar ne "9999-12-31" ) {
         $borr->{'userdebarreddate'} = $debar;
     }
+    # FIXME looks like $available is not needed
+    # If a patron is discharged he has a validated discharge available
     my $available = Koha::Patron::Discharge::count({
         borrowernumber => $borrowernumber,
         validated      => 1,
@@ -270,24 +271,6 @@ if ($show_barcode) {
 }
 $template->param( show_barcode => 1 ) if $show_barcode;
 
-# load the branches
-my $branches = GetBranches();
-my @branch_loop;
-for my $branch_hash ( sort keys %{$branches} ) {
-    my $selected;
-    if ( C4::Context->preference('SearchMyLibraryFirst') ) {
-        $selected =
-          ( C4::Context->userenv
-              && ( $branch_hash eq C4::Context->userenv->{branch} ) );
-    }
-    push @branch_loop,
-      { value      => "branch: $branch_hash",
-        branchname => $branches->{$branch_hash}->{'branchname'},
-        selected   => $selected,
-      };
-}
-$template->param( branchloop => \@branch_loop );
-
 # now the reserved items....
 my $reserves = Koha::Holds->search( { borrowernumber => $borrowernumber } );