From 66250d2f6e35030e82f80a07132bcb0459035352 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Jun 2023 16:56:05 +0200 Subject: [PATCH] Bug 33947: Remove GetAllIssues No more occurrences of GetAllIssues, remove it! Test plan: git grep is your friend --- C4/Members.pm | 55 --------------------------------------------------- 1 file changed, 55 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index c17bbb2a326..07e8a49a457 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -45,8 +45,6 @@ BEGIN { GetMemberDetails GetMember - GetAllIssues - GetBorrowersToExpunge IssueSlip @@ -238,59 +236,6 @@ sub patronflags { return ( \%flags ); } -=head2 GetAllIssues - - $issues = &GetAllIssues($borrowernumber, $sortkey, $limit); - -Looks up what the patron with the given borrowernumber has borrowed, -and sorts the results. - -C<$sortkey> is the name of a field on which to sort the results. This -should be the name of a field in the C, C, -C, or C table in the Koha database. - -C<$limit> is the maximum number of results to return. - -C<&GetAllIssues> an arrayref, C<$issues>, of hashrefs, the keys of which -are the fields from the C, C, C, and -C tables of the Koha database. - -=cut - -#' -sub GetAllIssues { - my ( $borrowernumber, $order, $limit ) = @_; - - return unless $borrowernumber; - $order = 'date_due desc' unless $order; - - my $dbh = C4::Context->dbh; - my $query = -'SELECT issues.*, items.*, biblio.*, biblioitems.*, issues.timestamp as issuestimestamp, issues.renewals_count AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp,borrowers.firstname,borrowers.surname - FROM issues - LEFT JOIN items on items.itemnumber=issues.itemnumber - LEFT JOIN borrowers on borrowers.borrowernumber=issues.issuer_id - LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber - LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber - WHERE issues.borrowernumber=? - UNION ALL - SELECT old_issues.*, items.*, biblio.*, biblioitems.*, old_issues.timestamp as issuestimestamp, old_issues.renewals_count AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp,borrowers.firstname,borrowers.surname - FROM old_issues - LEFT JOIN items on items.itemnumber=old_issues.itemnumber - LEFT JOIN borrowers on borrowers.borrowernumber=old_issues.issuer_id - LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber - LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber - WHERE old_issues.borrowernumber=? AND old_issues.itemnumber IS NOT NULL - order by ' . $order; - if ($limit) { - $query .= " limit $limit"; - } - - my $sth = $dbh->prepare($query); - $sth->execute( $borrowernumber, $borrowernumber ); - return $sth->fetchall_arrayref( {} ); -} - sub checkcardnumber { my ( $cardnumber, $borrowernumber ) = @_; -- 2.25.1