Bugzilla – Attachment 152156 Details for
Bug 33947
Move GetAllIssues to Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33947: Remove GetAllIssues
Bug-33947-Remove-GetAllIssues.patch (text/plain), 2.98 KB, created by
Jonathan Druart
on 2023-06-08 11:02:55 UTC
(
hide
)
Description:
Bug 33947: Remove GetAllIssues
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-06-08 11:02:55 UTC
Size:
2.98 KB
patch
obsolete
>From 66250d2f6e35030e82f80a07132bcb0459035352 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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<issues>, C<biblio>, >-C<biblioitems>, or C<items> 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<issues>, C<biblio>, C<biblioitems>, and >-C<items> 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33947
:
152156
|
152195
|
156444
|
156445
|
156959