Bugzilla – Attachment 10348 Details for
Bug 8251
Patrons are systematically debarred at checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8251 - Patrons get incorrectly debarred
0001-Bug-8251-Patrons-get-incorrectly-debarred.patch (text/plain), 1.39 KB, created by
Julian Maurice
on 2012-06-18 10:35:48 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8251 - Patrons get incorrectly debarred
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-06-18 10:35:48 UTC
Size:
1.39 KB
patch
obsolete
>From 8e00df55b750c055778d4398825118b847d8f792 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Fri, 15 Jun 2012 14:51:42 -0300 >Subject: [PATCH] Bug 8251 - Patrons get incorrectly debarred > >Patrons get incorrectly debarred because of the use of Datetime->delta_days >wich happens to always return a positive number. > >Also changed the use of Datetime->truncate function so it follows the docs, >using 'day' instead of 'days' (which is used in DateTime::Duration). > >This patch has been tested against master. > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > Koha/Calendar.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index f63e7eb..dc132cd 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -173,9 +173,9 @@ sub days_between { > my $dateend_temp = $end_dt->clone(); > > # start and end should not be closed days >- my $duration = $dateend_temp->delta_days($datestart_temp); >- $datestart_temp->truncate( to => 'days' ); >- $dateend_temp->truncate( to => 'days' ); >+ $datestart_temp->truncate( to => 'day' ); >+ $dateend_temp->truncate( to => 'day' ); >+ my $duration = $dateend_temp - $datestart_temp; > while ( DateTime->compare( $datestart_temp, $dateend_temp ) == -1 ) { > $datestart_temp->add( days => 1 ); > if ( $self->is_holiday($datestart_temp) ) { >-- >1.7.10 >
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 8251
:
10289
|
10290
|
10308
| 10348 |
10418
|
10597
|
10767
|
10768
|
10914
|
11976
|
11979