Bug 19260: [QA Follow-up] Remove obsolete $dbh
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 6 Oct 2017 09:05:49 +0000 (11:05 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 6 Oct 2017 14:27:01 +0000 (11:27 -0300)
The variable is no longer used.
Removed a few empty lines on the way.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Reserves.pm

index 3d011a6..78f5ca3 100644 (file)
@@ -796,17 +796,12 @@ Cancels all reserves with an expiration date from before today.
 =cut
 
 sub CancelExpiredReserves {
-
     my $today = dt_from_string();
     my $cancel_on_holidays = C4::Context->preference('ExpireReservesOnHolidays');
     my $expireWaiting = C4::Context->preference('ExpireReservesMaxPickUpDelay');
 
-    my $dbh = C4::Context->dbh;
-
     my $dtf = Koha::Database->new->schema->storage->datetime_parser;
-
     my $params = { expirationdate => { '<', $dtf->format_date($today) } };
-
     $params->{found} = undef unless $expireWaiting;
 
     # FIXME To move to Koha::Holds->search_expired (?)
@@ -822,7 +817,6 @@ sub CancelExpiredReserves {
             $cancel_params->{charge_cancel_fee} = 1;
         }
         $hold->cancel( $cancel_params );
-
     }
 }