Bugzilla – Attachment 81831 Details for
Bug 21723
batch_anonymise.pl SQL-query runs out of memory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21723: Do no retrieve already anonymised entries
Bug-21723-Do-no-retrieve-already-anonymised-entrie.patch (text/plain), 1.45 KB, created by
Jonathan Druart
on 2018-11-01 16:22:48 UTC
(
hide
)
Description:
Bug 21723: Do no retrieve already anonymised entries
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-11-01 16:22:48 UTC
Size:
1.45 KB
patch
obsolete
>From 5c1b84ca728feddfcc8a18d5d77e567fb279a2b2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 1 Nov 2018 13:22:27 -0300 >Subject: [PATCH] Bug 21723: Do no retrieve already anonymised entries > >--- > Koha/Patrons.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm >index dedf4c4a65..5f8b2c8bcb 100644 >--- a/Koha/Patrons.pm >+++ b/Koha/Patrons.pm >@@ -154,11 +154,13 @@ sub search_patrons_to_anonymise { > ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && !C4::Context->IsSuperLibrarian() && C4::Context->userenv->{branch} ) > ? C4::Context->userenv->{branch} > : undef; >+ my $anonymous_patron = C4::Context->preference('AnonymousPatron') || undef; > > my $dtf = Koha::Database->new->schema->storage->datetime_parser; > my $rs = $class->_resultset->search( >- { returndate => { '<' => $dtf->format_datetime($older_than_date), }, >- 'old_issues.borrowernumber' => { 'not' => undef }, >+ { >+ returndate => { '<' => $dtf->format_datetime($older_than_date), }, >+ 'old_issues.borrowernumber' => { 'not' => [ undef, ( $anonymous_patron ? $anonymous_patron : () )]}, > privacy => { '<>' => 0 }, # Keep forever > ( $library ? ( 'old_issues.branchcode' => $library ) : () ), > }, >-- >2.11.0
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 21723
: 81831