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 3282-3288
biblionumber of old record
Link Here
|
3282 |
=item C<record> |
3282 |
=item C<record> |
3283 |
Incoming record that will be merged with old record |
3283 |
Incoming record that will be merged with old record |
3284 |
|
3284 |
|
3285 |
=item C<context> |
3285 |
=item C<overlay_context> |
3286 |
hashref containing at least one context module and filter value on |
3286 |
hashref containing at least one context module and filter value on |
3287 |
the form {module => filter, ...}. |
3287 |
the form {module => filter, ...}. |
3288 |
|
3288 |
|
Lines 3320-3327
sub ApplyMarcOverlayRules {
Link Here
|
3320 |
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); |
3320 |
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); |
3321 |
|
3321 |
|
3322 |
# Skip overlay rules if called with no context |
3322 |
# Skip overlay rules if called with no context |
3323 |
if ($old_record && defined $params->{context}) { |
3323 |
if ($old_record && defined $params->{overlay_context}) { |
3324 |
return Koha::MarcOverlayRules->merge_records($old_record, $incoming_record, $params->{context}); |
3324 |
return Koha::MarcOverlayRules->merge_records($old_record, $incoming_record, $params->{overlay_context}); |
3325 |
} |
3325 |
} |
3326 |
return $incoming_record; |
3326 |
return $incoming_record; |
3327 |
} |
3327 |
} |