Bugzilla – Attachment 76917 Details for
Bug 20287
Move AddMember and ModMember to Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20287: Fix update of patrons, clean the data before ->store
Bug-20287-Fix-update-of-patrons-clean-the-data-bef.patch (text/plain), 1.95 KB, created by
Jonathan Druart
on 2018-07-12 18:50:22 UTC
(
hide
)
Description:
Bug 20287: Fix update of patrons, clean the data before ->store
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-07-12 18:50:22 UTC
Size:
1.95 KB
patch
obsolete
>From 46b2564019dc7c7a6467e8fa03a3707df8e52541 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 23 Feb 2018 13:12:36 -0300 >Subject: [PATCH] Bug 20287: Fix update of patrons, clean the data before > ->store > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > members/memberentry.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 26853b042e..041dda23f6 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -223,6 +223,7 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) > qr/^\d+-DAYS/, > qr/^patron_attr_/, > qr/^csrf_token$/, >+ qr/^add_debarment$/, qr/^debarred_expiration$/ # We already dealt with debarments previously > ); > for my $regexp (@keys_to_delete) { > for (keys %newdata) { >@@ -524,7 +525,12 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ > delete $newdata{'password'}; > delete $newdata{'userid'}; > } >- &ModMember(%newdata) unless scalar(keys %newdata) <= 1; # bug 4508 - avoid crash if we're not >+ >+ my $patron = Koha::Patrons->find( $borrowernumber ); >+ $newdata{debarredcomment} = $newdata{debarred_comment}; >+ delete $newdata{debarred_comment}; >+ delete $newdata{password2}; >+ $patron->set(\%newdata)->store if scalar(keys %newdata) > 1; # bug 4508 - avoid crash if we're not > # updating any columns in the borrowers table, > # which can happen if we're only editing the > # patron attributes or messaging preferences sections >-- >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 20287
:
73436
|
76901
|
76902
|
76903
|
76904
|
76905
|
76906
|
76907
|
76908
|
76909
|
76910
|
76911
|
76912
|
76913
|
76914
|
76915
|
76916
| 76917 |
76918
|
76919
|
76920
|
76921
|
76922
|
76923
|
76924
|
76927
|
77221