From 4716c495e091cb9cf6e867bfaa993fd5aeb8ccae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petter=20Goks=C3=B8yr=20=C3=85sen?= Date: Wed, 23 Nov 2016 11:12:24 +0100 Subject: [PATCH] Bug 17671: Remove unused variables in C4::Reserves I was reading through Reserves.pm trying to figure out a bug - found some unused variables instead. Signed-off-by: Alex Buckley Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- C4/Reserves.pm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 83903e89a1..9ef33ad8ba 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -175,8 +175,6 @@ sub AddReserve { $title, $checkitem, $found, $itemtype ) = @_; - my $dbh = C4::Context->dbh; - $resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); @@ -1182,7 +1180,6 @@ sub ModReserve { return unless ( $reserve_id || ( $borrowernumber && ( $biblionumber || $itemnumber ) ) ); $reserve_id = GetReserveId({ biblionumber => $biblionumber, borrowernumber => $borrowernumber, itemnumber => $itemnumber }) unless ( $reserve_id ); - my $dbh = C4::Context->dbh; if ( $rank eq "del" ) { CancelReserve({ reserve_id => $reserve_id }); } @@ -1232,8 +1229,6 @@ sub ModReserveFill { my ($res) = @_; my $reserve_id = $res->{'reserve_id'}; - my $dbh = C4::Context->dbh; - my $hold = Koha::Holds->find($reserve_id); # get the priority on this record.... @@ -1247,7 +1242,7 @@ sub ModReserveFill { } ); - my $old_hold = Koha::Old::Hold->new( $hold->unblessed() )->store(); + Koha::Old::Hold->new( $hold->unblessed() )->store(); $hold->delete(); @@ -1596,8 +1591,6 @@ Input: $where is 'up', 'down', 'top' or 'bottom'. Biblionumber, Date reserve was sub AlterPriority { my ( $where, $reserve_id ) = @_; - my $dbh = C4::Context->dbh; - my $reserve = GetReserve( $reserve_id ); if ( $reserve->{cancellationdate} ) { @@ -2176,7 +2169,6 @@ sub MoveReserve { return unless $res; my $biblionumber = $res->{biblionumber}; - my $biblioitemnumber = $res->{biblioitemnumber}; if ($res->{borrowernumber} == $borrowernumber) { ModReserveFill($res); -- 2.39.5