Bugzilla – Attachment 87059 Details for
Bug 22577
Cronjobs (and other scripts) should be attributed to a 'real' user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22577: Prevent system users from returning in searches
Bug-22577-Prevent-system-users-from-returning-in-s.patch (text/plain), 915 bytes, created by
Martin Renvoize (ashimema)
on 2019-03-27 10:31:35 UTC
(
hide
)
Description:
Bug 22577: Prevent system users from returning in searches
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-27 10:31:35 UTC
Size:
915 bytes
patch
obsolete
>From e576c48ebc29ed46ac3c4b4a8f1b6907326f4c61 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 27 Mar 2019 06:55:35 +0000 >Subject: [PATCH] Bug 22577: Prevent system users from returning in searches > >--- > Koha/Patrons.pm | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm >index dedf4c4a65..e3e914b1fc 100644 >--- a/Koha/Patrons.pm >+++ b/Koha/Patrons.pm >@@ -208,6 +208,20 @@ sub anonymise_issue_history { > return $nb_rows; > } > >+=head3 search >+ >+ Koha::Patrons->search(); >+ >+Ensure patron searches do not return internal system users >+ >+=cut >+ >+sub search { >+ my ( $self, $params, $attr ) = @_; >+ return $self->SUPER::search( { borrowernumber => { '>' => 0 } } ) >+ ->SUPER::search( $params, $attr ); >+} >+ > =head3 delete > > Koha::Patrons->search({ some filters here })->delete({ move => 1 }); >-- >2.20.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 22577
:
86991
|
86992
|
86993
|
87007
|
87008
|
87013
|
87014
|
87015
|
87017
|
87028
|
87029
|
87030
|
87031
|
87032
|
87053
|
87054
|
87055
|
87056
|
87057
|
87058
| 87059 |
87060