Bugzilla – Attachment 43797 Details for
Bug 14918
Remove C4::Dates from circ/pendingreserves.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14918: [QA Follow-up] Correct enddate and use constant
Bug-14918-QA-Follow-up-Correct-enddate-and-use-con.patch (text/plain), 2.51 KB, created by
Marcel de Rooy
on 2015-10-23 06:53:34 UTC
(
hide
)
Description:
Bug 14918: [QA Follow-up] Correct enddate and use constant
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-10-23 06:53:34 UTC
Size:
2.51 KB
patch
obsolete
>From e47cd55a575818da1c7438d82f8ec2d2002c125a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 23 Oct 2015 08:47:58 +0200 >Subject: [PATCH] Bug 14918: [QA Follow-up] Correct enddate and use constant >Content-Type: text/plain; charset=utf-8 > >Corrected enddate (subtraction in the revised code must be an addition). >Replaced hardcoded 2 days by a constant. >Renamed the constant TWO_DAYS to PULL_INTERVAL. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested all three date formats. >--- > circ/pendingreserves.pl | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index fc2df04..4d6ec05 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -1,6 +1,5 @@ > #!/usr/bin/perl > >- > # Copyright 2000-2002 Katipo Communications > # > # This file is part of Koha. >@@ -26,7 +25,7 @@ > use strict; > #use warnings; FIXME - Bug 2505 > >-use constant TWO_DAYS => 2; >+use constant PULL_INTERVAL => 2; > > use C4::Context; > use C4::Output; >@@ -79,7 +78,7 @@ if ( $startdate ) { > unless ( $startdate ){ > # changed from delivered range of 10 years-yesterday to 2 days ago-today > # Find two days ago for the default shelf pull start date, unless HoldsToPullStartDate sys pref is set. >- $startdate = $today - DateTime::Duration->new( days => C4::Context->preference('HoldsToPullStartDate') || 2 ); >+ $startdate = $today - DateTime::Duration->new( days => C4::Context->preference('HoldsToPullStartDate') || PULL_INTERVAL ); > } > > if ( $enddate ) { >@@ -87,7 +86,7 @@ if ( $enddate ) { > } > unless ( $enddate ) { > #similarly: calculate end date with ConfirmFutureHolds (days) >- $enddate = $today - DateTime::Duration->new( days => C4::Context->preference('ConfirmFutureHolds') || 0 ); >+ $enddate = $today + DateTime::Duration->new( days => C4::Context->preference('ConfirmFutureHolds') || 0 ); > } > > my @reservedata; >@@ -206,8 +205,8 @@ $template->param( > run_report => $run_report, > reserveloop => \@reservedata, > "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, >- HoldsToPullStartDate=> C4::Context->preference('HoldsToPullStartDate')||TWO_DAYS, >- HoldsToPullEndDate => C4::Context->preference('ConfirmFutureHolds')||0, >+ HoldsToPullStartDate => C4::Context->preference('HoldsToPullStartDate') || PULL_INTERVAL, >+ HoldsToPullEndDate => C4::Context->preference('ConfirmFutureHolds') || 0, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14918
:
42946
|
42959
|
42992
|
43003
|
43796
|
43797
|
43798
|
43799