Bug 24159: Fix one occurrence in updatedatabase.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Mar 2020 08:00:15 +0000 (09:00 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 25 Jun 2020 08:51:59 +0000 (10:51 +0200)
Here we just want to get the value from the syspref, the circ rule does
not exist yet.

Signed-off-by: Simon Perry <simon.perry@itcarlow.ie>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/updatedatabase.pl

index 139042b..79415b0 100755 (executable)
@@ -14374,7 +14374,7 @@ if( CheckVersion( $DBversion ) ) {
 
         my $expirationdate = dt_from_string($hold->{waitingdate});
         if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) {
-            my $calendar = Koha::Calendar->new( branchcode => $hold->{branchcode} );
+            my $calendar = Koha::Calendar->new( branchcode => $hold->{branchcode}, days_mode => C4::Context->preference('useDaysMode') );
             $expirationdate = $calendar->days_forward( $expirationdate, $max_pickup_delay );
         } else {
             $expirationdate->add( days => $max_pickup_delay );