Bug 19055: Remove C4::Reserves::GetReservesToBranch
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 7 Aug 2017 20:25:15 +0000 (17:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 1 Sep 2017 16:00:05 +0000 (13:00 -0300)
This subroutine is no longer in used and can be removed

Test plan:
  git grep GetReservesToBranch
must not return any results

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Reserves.pm

index c3b2126..f07dd7f 100644 (file)
@@ -106,7 +106,6 @@ BEGIN {
 
         &GetReserve
         &GetReservesForBranch
 
         &GetReserve
         &GetReservesForBranch
-        &GetReservesToBranch
         &GetReserveCount
         &GetReserveStatus
 
         &GetReserveCount
         &GetReserveStatus
 
@@ -609,33 +608,6 @@ SELECT COUNT(*) FROM reserves WHERE biblionumber=? AND borrowernumber<>?
     return $fee;
 }
 
     return $fee;
 }
 
-=head2 GetReservesToBranch
-
-  @transreserv = GetReservesToBranch( $frombranch );
-
-Get reserve list for a given branch
-
-=cut
-
-sub GetReservesToBranch {
-    my ( $frombranch ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare(
-        "SELECT reserve_id,borrowernumber,reservedate,itemnumber,timestamp
-         FROM reserves
-         WHERE priority='0'
-           AND branchcode=?"
-    );
-    $sth->execute( $frombranch );
-    my @transreserv;
-    my $i = 0;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        $transreserv[$i] = $data;
-        $i++;
-    }
-    return (@transreserv);
-}
-
 =head2 GetReservesForBranch
 
   @transreserv = GetReservesForBranch($frombranch);
 =head2 GetReservesForBranch
 
   @transreserv = GetReservesForBranch($frombranch);