Bugzilla – Attachment 85257 Details for
Bug 3820
More detailed patron record changes log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3820: (follow-up) Clean up warnings
Bug-3820-follow-up-Clean-up-warnings.patch (text/plain), 3.06 KB, created by
Josef Moravec
on 2019-02-18 19:20:15 UTC
(
hide
)
Description:
Bug 3820: (follow-up) Clean up warnings
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-02-18 19:20:15 UTC
Size:
3.06 KB
patch
obsolete
>From 23a9c3b11ed6b939fd26c571e45ed4746511953b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 14 Feb 2019 12:28:30 +0000 >Subject: [PATCH] Bug 3820: (follow-up) Clean up warnings > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > Koha/Patron.pm | 42 ++++++++++++++++++++++++++++++++++++------ > 1 file changed, 36 insertions(+), 6 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index ad99c2c..c2b4738 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -258,17 +258,47 @@ sub store { > # Actionlogs > if ( C4::Context->preference("BorrowersLog") ) { > my $info; >- for my $key ( keys %{ $self_from_storage->unblessed } ) { >- if ( $self_from_storage->$key ne $self->$key ) { >+ my $from_storage = $self_from_storage->unblessed; >+ my $from_object = $self->unblessed; >+ for my $key ( keys %{$from_storage} ) { >+ if ( >+ ( >+ !defined( $from_storage->{$key} ) >+ && defined( $from_object->{$key} ) >+ ) >+ || ( defined( $from_storage->{$key} ) >+ && !defined( $from_object->{$key} ) ) >+ || ( >+ defined( $from_storage->{$key} ) >+ && defined( $from_object->{$key} ) >+ && ( $from_storage->{$key} ne >+ $from_object->{$key} ) >+ ) >+ ) >+ { > $info->{$key} = { >- before => $self_from_storage->$key, >- after => $self->$key >+ before => $from_storage->{$key}, >+ after => $from_object->{$key} > }; > } > } > >- logaction( "MEMBERS", "MODIFY", $self->borrowernumber, >- to_json( $info, { utf8 => 1, pretty => 1, canonical => 1 } ) ); >+ if ( defined($info) ) { >+ logaction( >+ "MEMBERS", >+ "MODIFY", >+ $self->borrowernumber, >+ to_json( >+ $info, >+ { utf8 => 1, pretty => 1, canonical => 1 } >+ ) >+ ); >+ } >+ else { >+ logaction( "MEMBERS", "MODIFY", $self->borrowernumber, >+ "NON-STANDARD FIELD CHANGED" ); >+ >+ } > } > > # Final store >-- >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 3820
:
1584
|
1585
|
85100
|
85102
|
85103
|
85104
|
85161
|
85162
|
85196
|
85197
|
85243
|
85244
|
85245
|
85246
|
85256
|
85257
|
85258
|
85259
|
85260
|
85269
|
85270
|
85271
|
85272
|
85273
|
85274
|
85276
|
85277