From e9f859c0e433d3cf3c0123432787a5801fa5a7d7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Aug 2018 19:42:20 -0300 Subject: [PATCH] Bug 21207: Remove unused RM C4::Overdues::GetItems sub Test plan: git grep GetItems | grep -v GetItemsInCollection | grep -v GetItemsForInventory | grep -v GetItemsInfo | grep -v GetItemsLocationInfo | grep -v GetItemsAvailable | grep -v GetItemsByBiblioitemnumber should not return any occurrences of code in perl scripts Signed-off-by: Josef Moravec Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit 3795141f54991e0a4c95629754ac2759330ed2e6) Signed-off-by: Martin Renvoize --- C4/Overdues.pm | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 6b75e3898a..f5c5132c96 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -69,11 +69,6 @@ BEGIN { push @EXPORT, qw( &GetIssuesIteminfo ); - - # subs to move to Biblio.pm - push @EXPORT, qw( - &GetItems - ); } =head1 NAME @@ -699,35 +694,6 @@ sub GetFine { return 0; } -=head2 GetItems - - ($items) = &GetItems($itemnumber); - -Returns the list of all delays from overduerules. - -C<$items> is a reference-to-hash whose keys are all of the fields -from the items tables of the Koha database. Thus, - -C<$itemnumber> contains the borrower categorycode - -=cut - -# FIXME: This is a bad function to have here. -# Shouldn't it be in C4::Items? -# Shouldn't it be called GetItem since you only get 1 row? -# Shouldn't it be called GetItem since you give it only 1 itemnumber? - -sub GetItems { - my $itemnumber = shift or return; - my $query = qq|SELECT * - FROM items - WHERE itemnumber=?|; - my $sth = C4::Context->dbh->prepare($query); - $sth->execute($itemnumber); - my ($items) = $sth->fetchrow_hashref; - return ($items); -} - =head2 GetBranchcodesWithOverdueRules my @branchcodes = C4::Overdues::GetBranchcodesWithOverdueRules() -- 2.39.5