[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 351a8276712ddeb5c6f2d4cec1fe386fd6f5d841

Evergreen Git git at git.evergreen-ils.org
Fri Feb 14 19:27:35 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  351a8276712ddeb5c6f2d4cec1fe386fd6f5d841 (commit)
      from  0ec0ddcbf19384858460c57784d97768ffe050d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 351a8276712ddeb5c6f2d4cec1fe386fd6f5d841
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Thu Jun 21 11:38:39 2012 -0400

    Assume that future checkins are junk input
    
    This can happen with SIP2 clients with badly set clocks.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index b390688..5f73860 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3637,7 +3637,12 @@ sub checkin_handle_backdate {
     my $new_date = DateTime::Format::ISO8601->new->parse_datetime($bd);
     $new_date->set_hour($original_date->hour());
     $new_date->set_minute($original_date->minute());
-    $bd = cleanse_ISO8601($new_date->datetime());
+    if ($new_date >= DateTime->now) {
+        # We can't say that the item will be checked in later...so assume someone's clock is wrong instead.
+        $bd = undef;
+    } else {
+        $bd = cleanse_ISO8601($new_date->datetime());
+    }
 
     $self->backdate($bd);
     return undef;

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Circ/Circulate.pm      |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list