From afeca7cfa8635984eacc88014696a931cbf54cb3 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Fri, 8 Mar 2019 11:40:54 +0200 Subject: [PATCH] Bug 13937: Switch from GetItem() to Koha::Items->find() Signed-off-by: Stefan Berndtsson Signed-off-by: Martin Renvoize --- Koha/Z3950Responder/Session.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Koha/Z3950Responder/Session.pm b/Koha/Z3950Responder/Session.pm index c64cc0c5a2..e90259e2cb 100644 --- a/Koha/Z3950Responder/Session.pm +++ b/Koha/Z3950Responder/Session.pm @@ -23,9 +23,10 @@ use Modern::Perl; use C4::Circulation qw( GetTransfers ); use C4::Context; -use C4::Items qw( GetItem ); use C4::Reserves qw( GetReserveStatus ); use C4::Search qw(); + +use Koha::Items; use Koha::Logger; =head1 NAME @@ -262,28 +263,28 @@ sub add_item_status { my $itemnumber = $field->subfield($itemnumber_subfield); next unless $itemnumber; - my $item = GetItem( $itemnumber ); + my $item = Koha::Items->find( $itemnumber ); return unless $item; my @statuses; - if ( $item->{onloan} ) { + if ( $item->onloan() ) { push @statuses, $status_strings->{CHECKED_OUT}; } - if ( $item->{itemlost} ) { + if ( $item->itemlost() ) { push @statuses, $status_strings->{LOST}; } - if ( $item->{notforloan} ) { + if ( $item->notforloan() ) { push @statuses, $status_strings->{NOT_FOR_LOAN}; } - if ( $item->{damaged} ) { + if ( $item->damaged() ) { push @statuses, $status_strings->{DAMAGED}; } - if ( $item->{withdrawn} ) { + if ( $item->withdrawn() ) { push @statuses, $status_strings->{WITHDRAWN}; } -- 2.39.5