From f56d20466698b2b8a6c3fbb96fd472dbeab71592 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 27 Feb 2018 14:04:56 -0500 Subject: [PATCH] Bug 18786: Remove use of Koha::Patron::Images --- C4/SIP/ILS.pm | 39 ++++++++++++++------------------------- members/paycollect.pl | 1 - 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index 1bd23c6..1152b7a 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -436,31 +436,20 @@ sub renew { return $trans; } - # Previously: renewing a title, rather than an item (sort of) - # This is gross, but in a real ILS it would be better - - # if (defined($title_id)) { - # foreach my $i (@{$patron->{items}}) { - # $item = new ILS::Item $i; - # last if ($title_id eq $item->title_id); - # $item = undef; - # } - # } else { - my $j = 0; - my $count = scalar @{$patron->{items}}; - foreach my $i (@{$patron->{items}}) { - unless (defined $i->{barcode}) { # FIXME: using data instead of objects may violate the abstraction layer - syslog("LOG_ERR", "No barcode for item %s of %s: $item_id", $j+1, $count); - next; - } - syslog("LOG_DEBUG", "checking item %s of %s: $item_id vs. %s", ++$j, $count, $i->{barcode}); - if ($i->{barcode} eq $item_id) { - # We have it checked out - $item = C4::SIP::ILS::Item->new( $item_id ); - last; - } - } - # } + my $j = 0; + my $count = scalar @{$patron->{items}}; + foreach my $i (@{$patron->{items}}) { + unless (defined $i->{barcode}) { # FIXME: using data instead of objects may violate the abstraction layer + syslog("LOG_ERR", "No barcode for item %s of %s: $item_id", $j+1, $count); + next; + } + syslog("LOG_DEBUG", "checking item %s of %s: $item_id vs. %s", ++$j, $count, $i->{barcode}); + if ($i->{barcode} eq $item_id) { + # We have it checked out + $item = C4::SIP::ILS::Item->new( $item_id ); + last; + } + } $trans->item($item); diff --git a/members/paycollect.pl b/members/paycollect.pl index 9a3ca21..2f0c1f9 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -30,7 +30,6 @@ use C4::Accounts; use C4::Koha; use Koha::Patrons; -use Koha::Patron::Images; use Koha::Patron::Categories; use Koha::AuthorisedValues; use Koha::Account; -- 2.10.2