Bugzilla – Attachment 58560 Details for
Bug 17824
Remove C4::Members::GetBorrowersWhoHaveNeverBorrowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17824: Remove C4::Members::GetBorrowersWhoHaveNeverBorrowed
Bug-17824-Remove-C4MembersGetBorrowersWhoHaveNever.patch (text/plain), 3.08 KB, created by
Mark Tompsett
on 2017-01-03 05:10:58 UTC
(
hide
)
Description:
Bug 17824: Remove C4::Members::GetBorrowersWhoHaveNeverBorrowed
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-01-03 05:10:58 UTC
Size:
3.08 KB
patch
obsolete
>From 9817231b33d026b91ac1f31db8d066bbfd16441e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 28 Dec 2016 18:19:34 +0000 >Subject: [PATCH] Bug 17824: Remove > C4::Members::GetBorrowersWhoHaveNeverBorrowed > >This subroutine is no longer in used and can be removed. > >Test plan: > git grep GetBorrowersWhoHaveNeverBorrowed >must not return any results > >NOTE: grep -i getborrowerswhohave `find . -type f` > works well enough to find the cleanborrowers.pl too. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Members.pm | 48 ------------------------------------------------ > tools/cleanborrowers.pl | 2 +- > 2 files changed, 1 insertion(+), 49 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index dfe4cbd..ff341e3 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -73,7 +73,6 @@ BEGIN { > &GetBorNotifyAcctRecord > > &GetBorrowersToExpunge >- &GetBorrowersWhoHaveNeverBorrowed > &GetBorrowersWithIssuesHistoryOlderThan > > &IssueSlip >@@ -1151,53 +1150,6 @@ sub GetBorrowersToExpunge { > return \@results; > } > >-=head2 GetBorrowersWhoHaveNeverBorrowed >- >- $results = &GetBorrowersWhoHaveNeverBorrowed >- >-This function get all borrowers who have never borrowed. >- >-I<$result> is a ref to an array which all elements are a hasref. >- >-=cut >- >-sub GetBorrowersWhoHaveNeverBorrowed { >- my $filterbranch = shift || >- ((C4::Context->preference('IndependentBranches') >- && C4::Context->userenv >- && !C4::Context->IsSuperLibrarian() >- && C4::Context->userenv->{branch}) >- ? C4::Context->userenv->{branch} >- : ""); >- my $dbh = C4::Context->dbh; >- my $query = " >- SELECT borrowers.borrowernumber,max(timestamp) as latestissue >- FROM borrowers >- LEFT JOIN issues ON borrowers.borrowernumber = issues.borrowernumber >- WHERE issues.borrowernumber IS NULL >- "; >- my @query_params; >- if ($filterbranch && $filterbranch ne ""){ >- $query.=" AND borrowers.branchcode= ?"; >- push @query_params,$filterbranch; >- } >- warn $query if $debug; >- >- my $sth = $dbh->prepare($query); >- if (scalar(@query_params)>0){ >- $sth->execute(@query_params); >- } >- else { >- $sth->execute; >- } >- >- my @results; >- while ( my $data = $sth->fetchrow_hashref ) { >- push @results, $data; >- } >- return \@results; >-} >- > =head2 GetBorrowersWithIssuesHistoryOlderThan > > $results = &GetBorrowersWithIssuesHistoryOlderThan($date) >diff --git a/tools/cleanborrowers.pl b/tools/cleanborrowers.pl >index a1c2135..6714614 100755 >--- a/tools/cleanborrowers.pl >+++ b/tools/cleanborrowers.pl >@@ -36,7 +36,7 @@ use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; >-use C4::Members; # GetBorrowersWhoHavexxxBorrowed. >+use C4::Members; > use C4::Circulation; # AnonymiseIssueHistory. > use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Patron::Categories; >-- >2.1.4
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 17824
:
58484
|
58560
|
59153