From: Jason Boyer Date: Mon, 19 Nov 2018 20:55:20 +0000 (-0500) Subject: LP1772062: Specify Module Path to clense_ISO8601 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4512c535fdda12cb045a2fa3e73f1654007afeb3;p=working%2FEvergreen.git LP1772062: Specify Module Path to clense_ISO8601 Recent changes to Actor.pm left undecorated calls to clense_ISO8601 undefined because that function doesn't live in OpenILS::Application::Actor, causing password reset requests to fail with 500 errors. This branch adds the module path to the call so it can be used without a 'use OpenSRF...' at the top of the file. Booking also had an undecorated call that I didn't test for failure but this belt + suspenders change can't hurt anything but our fashion sense. Signed-off-by: Jason Boyer --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index 31e7083e50..ee456b79e2 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -4064,7 +4064,7 @@ sub _reset_password_request { # Guard against no active requests if ($active_requests->[0]->{'request_time'}) { - my $last_request = DateTime::Format::ISO8601->parse_datetime(clense_ISO8601($active_requests->[0]->{'request_time'})); + my $last_request = DateTime::Format::ISO8601->parse_datetime(OpenSRF::Utils::clense_ISO8601($active_requests->[0]->{'request_time'})); my $now = DateTime::Format::ISO8601->new(); # 3. if (num_active > throttle_threshold) and (now - last_request < 1 minute) @@ -4171,7 +4171,7 @@ sub commit_password_reset { # Ensure we're still within the TTL for the request my $aupr_ttl = $U->ou_ancestor_setting_value($user->home_ou, 'circ.password_reset_request_time_to_live') || 24*60*60; - my $threshold = DateTime::Format::ISO8601->parse_datetime(clense_ISO8601($aupr->[0]->request_time))->add(seconds => $aupr_ttl); + my $threshold = DateTime::Format::ISO8601->parse_datetime(OpenSRF::Utils::clense_ISO8601($aupr->[0]->request_time))->add(seconds => $aupr_ttl); if ($threshold < DateTime->now(time_zone => 'local')) { $e->die_event; $logger->info("Password reset request needed to be submitted before $threshold"); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm index d7ea2121d8..851fde9056 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm @@ -830,7 +830,7 @@ sub could_capture { $client->respond($bresv); } else { my $start_time = $dt_parser->parse_datetime( - clense_ISO8601($bresv->start_time) + OpenSRF::Utils::clense_ISO8601($bresv->start_time) ); if ($now >= $start_time->subtract("seconds" => $elbow_room)) {