From db6968235b3bcf7b037f85ac9e5ca258dc412e9c Mon Sep 17 00:00:00 2001 From: djfiander Date: Sat, 15 Apr 2006 00:43:20 +0000 Subject: [PATCH] Get handling of institution IDs right. Make "block_patron" a method of the ILS::Patron object, rather than an ILS method --- ILS.pm | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/ILS.pm b/ILS.pm index db025a1..a9b303f 100644 --- a/ILS.pm +++ b/ILS.pm @@ -52,9 +52,9 @@ sub supports { sub check_inst_id { my ($self, $id, $whence) = @_; - if ($id ne $self->{institution}) { + if ($id ne $self->{institution}->{id}) { syslog("WARNING", "%s: received institution '%s', expected '%s'", - $whence, $id, $self->{institution}); + $whence, $id, $self->{institution}->{id}); } } @@ -130,26 +130,6 @@ sub checkin { return $circ; } -sub block_patron { - my ($self, $patron_id, $card_retained, $blocked_card_msg) = @_; - my $patron; - - $patron = new ILS::Patron $patron_id; - - if (!$patron) { - syslog("WARNING", "ILS::block_patron: attempting to block non-existant patron '%s'", $patron_id); - return undef; - } - - foreach my $field ('charge_ok', 'renew_ok', 'recall_ok', 'hold_ok') { - $patron->{$field} = 'N'; - } - - $patron->{screen_msg} = $blocked_card_msg || "Card Blocked. Please contact library staff"; - - return $patron; -} - # If the ILS caches patron information, this lets it free # it up sub end_patron_session { -- 2.11.0