|
Lines 258-274
sub store {
Link Here
|
| 258 |
# Actionlogs |
258 |
# Actionlogs |
| 259 |
if ( C4::Context->preference("BorrowersLog") ) { |
259 |
if ( C4::Context->preference("BorrowersLog") ) { |
| 260 |
my $info; |
260 |
my $info; |
| 261 |
for my $key ( keys %{ $self_from_storage->unblessed } ) { |
261 |
my $from_storage = $self_from_storage->unblessed; |
| 262 |
if ( $self_from_storage->$key ne $self->$key ) { |
262 |
my $from_object = $self->unblessed; |
|
|
263 |
for my $key ( keys %{$from_storage} ) { |
| 264 |
if ( |
| 265 |
( |
| 266 |
!defined( $from_storage->{$key} ) |
| 267 |
&& defined( $from_object->{$key} ) |
| 268 |
) |
| 269 |
|| ( defined( $from_storage->{$key} ) |
| 270 |
&& !defined( $from_object->{$key} ) ) |
| 271 |
|| ( |
| 272 |
defined( $from_storage->{$key} ) |
| 273 |
&& defined( $from_object->{$key} ) |
| 274 |
&& ( $from_storage->{$key} ne |
| 275 |
$from_object->{$key} ) |
| 276 |
) |
| 277 |
) |
| 278 |
{ |
| 263 |
$info->{$key} = { |
279 |
$info->{$key} = { |
| 264 |
before => $self_from_storage->$key, |
280 |
before => $from_storage->{$key}, |
| 265 |
after => $self->$key |
281 |
after => $from_object->{$key} |
| 266 |
}; |
282 |
}; |
| 267 |
} |
283 |
} |
| 268 |
} |
284 |
} |
| 269 |
|
285 |
|
| 270 |
logaction( "MEMBERS", "MODIFY", $self->borrowernumber, |
286 |
if ( defined($info) ) { |
| 271 |
to_json( $info, { utf8 => 1, pretty => 1, canonical => 1 } ) ); |
287 |
logaction( |
|
|
288 |
"MEMBERS", |
| 289 |
"MODIFY", |
| 290 |
$self->borrowernumber, |
| 291 |
to_json( |
| 292 |
$info, |
| 293 |
{ utf8 => 1, pretty => 1, canonical => 1 } |
| 294 |
) |
| 295 |
); |
| 296 |
} |
| 297 |
else { |
| 298 |
logaction( "MEMBERS", "MODIFY", $self->borrowernumber, |
| 299 |
"NON-STANDARD FIELD CHANGED" ); |
| 300 |
|
| 301 |
} |
| 272 |
} |
302 |
} |
| 273 |
|
303 |
|
| 274 |
# Final store |
304 |
# Final store |
| 275 |
- |
|
|