Lines 332-338
The C<$options> argument is a hashref with additional parameters:
Link Here
|
332 |
|
332 |
|
333 |
=over 4 |
333 |
=over 4 |
334 |
|
334 |
|
335 |
=item C<context> |
335 |
=item C<overlay_context> |
336 |
|
336 |
|
337 |
This parameter is forwarded to L</ApplyMarcOverlayRules> where it is used for |
337 |
This parameter is forwarded to L</ApplyMarcOverlayRules> where it is used for |
338 |
selecting the current rule set if MARCOverlayRules is enabled. |
338 |
selecting the current rule set if MARCOverlayRules is enabled. |
Lines 389-401
sub ModBiblio {
Link Here
|
389 |
if ( C4::Context->preference('MARCOverlayRules') |
389 |
if ( C4::Context->preference('MARCOverlayRules') |
390 |
&& $biblionumber |
390 |
&& $biblionumber |
391 |
&& defined $options |
391 |
&& defined $options |
392 |
&& exists $options->{'context'} ) |
392 |
&& exists $options->{overlay_context} ) |
393 |
{ |
393 |
{ |
394 |
$record = ApplyMarcOverlayRules( |
394 |
$record = ApplyMarcOverlayRules( |
395 |
{ |
395 |
{ |
396 |
biblionumber => $biblionumber, |
396 |
biblionumber => $biblionumber, |
397 |
record => $record, |
397 |
record => $record, |
398 |
context => $options->{'context'}, |
398 |
overlay_context => $options->{overlay_context}, |
399 |
} |
399 |
} |
400 |
); |
400 |
); |
401 |
} |
401 |
} |
Lines 3277-3283
biblionumber of old record
Link Here
|
3277 |
=item C<record> |
3277 |
=item C<record> |
3278 |
Incoming record that will be merged with old record |
3278 |
Incoming record that will be merged with old record |
3279 |
|
3279 |
|
3280 |
=item C<context> |
3280 |
=item C<overlay_context> |
3281 |
hashref containing at least one context module and filter value on |
3281 |
hashref containing at least one context module and filter value on |
3282 |
the form {module => filter, ...}. |
3282 |
the form {module => filter, ...}. |
3283 |
|
3283 |
|
Lines 3315-3322
sub ApplyMarcOverlayRules {
Link Here
|
3315 |
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); |
3315 |
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); |
3316 |
|
3316 |
|
3317 |
# Skip overlay rules if called with no context |
3317 |
# Skip overlay rules if called with no context |
3318 |
if ($old_record && defined $params->{context}) { |
3318 |
if ($old_record && defined $params->{overlay_context}) { |
3319 |
return Koha::MarcOverlayRules->merge_records($old_record, $incoming_record, $params->{context}); |
3319 |
return Koha::MarcOverlayRules->merge_records($old_record, $incoming_record, $params->{overlay_context}); |
3320 |
} |
3320 |
} |
3321 |
return $incoming_record; |
3321 |
return $incoming_record; |
3322 |
} |
3322 |
} |