Bug 9343: handles the new format of Debarred
authorAdrien Saurat <adrien.saurat@biblibre.com>
Thu, 3 Jan 2013 16:08:02 +0000 (17:08 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 23 Jan 2013 01:01:06 +0000 (20:01 -0500)
The debarred status in DB switched from a boolean to a date.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Correctly pulls debared flag instead of debarment date.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/SIP/ILS/Patron.pm

index 8c00a11..ac24d2f 100644 (file)
@@ -41,7 +41,7 @@ sub new {
     $debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
     my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with .
     my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'";
-    my $debarred  = $kp->{debarred};  # 1 if ($kp->{flags}->{DBARRED}->{noissues});
+    my $debarred  = defined($kp->{flags}->{DBARRED});
     $debug and warn sprintf("Debarred = %s : ", ($debarred||'undef')) . Dumper(%{$kp->{flags}});
     my ($day, $month, $year) = (localtime)[3,4,5];
     my $today    = sprintf '%04d-%02d-%02d', $year+1900, $month+1, $day;