|
Lines 325-331
The C<$options> argument is a hashref with additional parameters:
Link Here
|
| 325 |
|
325 |
|
| 326 |
=over 4 |
326 |
=over 4 |
| 327 |
|
327 |
|
| 328 |
=item C<context> |
328 |
=item C<overlay_context> |
| 329 |
|
329 |
|
| 330 |
This parameter is forwarded to L</ApplyMarcOverlayRules> where it is used for |
330 |
This parameter is forwarded to L</ApplyMarcOverlayRules> where it is used for |
| 331 |
selecting the current rule set if MARCOverlayRules is enabled. |
331 |
selecting the current rule set if MARCOverlayRules is enabled. |
|
Lines 382-394
sub ModBiblio {
Link Here
|
| 382 |
if ( C4::Context->preference('MARCOverlayRules') |
382 |
if ( C4::Context->preference('MARCOverlayRules') |
| 383 |
&& $biblionumber |
383 |
&& $biblionumber |
| 384 |
&& defined $options |
384 |
&& defined $options |
| 385 |
&& exists $options->{'context'} ) |
385 |
&& exists $options->{overlay_context} ) |
| 386 |
{ |
386 |
{ |
| 387 |
$record = ApplyMarcOverlayRules( |
387 |
$record = ApplyMarcOverlayRules( |
| 388 |
{ |
388 |
{ |
| 389 |
biblionumber => $biblionumber, |
389 |
biblionumber => $biblionumber, |
| 390 |
record => $record, |
390 |
record => $record, |
| 391 |
context => $options->{'context'}, |
391 |
overlay_context => $options->{overlay_context}, |
| 392 |
} |
392 |
} |
| 393 |
); |
393 |
); |
| 394 |
} |
394 |
} |
|
Lines 3262-3268
biblionumber of old record
Link Here
|
| 3262 |
=item C<record> |
3262 |
=item C<record> |
| 3263 |
Incoming record that will be merged with old record |
3263 |
Incoming record that will be merged with old record |
| 3264 |
|
3264 |
|
| 3265 |
=item C<context> |
3265 |
=item C<overlay_context> |
| 3266 |
hashref containing at least one context module and filter value on |
3266 |
hashref containing at least one context module and filter value on |
| 3267 |
the form {module => filter, ...}. |
3267 |
the form {module => filter, ...}. |
| 3268 |
|
3268 |
|
|
Lines 3300-3307
sub ApplyMarcOverlayRules {
Link Here
|
| 3300 |
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); |
3300 |
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); |
| 3301 |
|
3301 |
|
| 3302 |
# Skip overlay rules if called with no context |
3302 |
# Skip overlay rules if called with no context |
| 3303 |
if ($old_record && defined $params->{context}) { |
3303 |
if ($old_record && defined $params->{overlay_context}) { |
| 3304 |
return Koha::MarcOverlayRules->merge_records($old_record, $incoming_record, $params->{context}); |
3304 |
return Koha::MarcOverlayRules->merge_records($old_record, $incoming_record, $params->{overlay_context}); |
| 3305 |
} |
3305 |
} |
| 3306 |
return $incoming_record; |
3306 |
return $incoming_record; |
| 3307 |
} |
3307 |
} |