Bug 29440: Rename $modify_biblio_marc_options to $mod_bilbio_options

This variable actually contains ModBibio options and
ModifyBiblioMarc accepts a subset of these

Signed-off-by: Michał Kula <148193449+mkibp@users.noreply.github.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
David Gustafsson 2022-09-26 16:46:30 +02:00 committed by Katrin Fischer
parent 33d274bbb9
commit fd3efab876
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 4 additions and 4 deletions

View File

@ -124,7 +124,7 @@ if ($all) {
}
my $using_elastic_search = (C4::Context->preference('SearchEngine') eq 'Elasticsearch');
my $modify_biblio_marc_options = {
my $mod_biblio_options = {
disable_autolink => $using_elastic_search,
defer_search_engine_indexing => $using_elastic_search,
overlay_context => { source => 'bulkmarcimport' }
@ -520,7 +520,7 @@ RECORD: foreach my $record (@{$marc_records}) {
};
if ($update) {
my $success;
eval { $success = ModBiblio($record, $matched_record_id, GetFrameworkCode($matched_record_id), $modify_biblio_marc_options) };
eval { $success = ModBiblio($record, $matched_record_id, GetFrameworkCode($matched_record_id), $mod_biblio_options) };
if ($@) {
warn "ERROR: Update biblio $matched_record_id failed: $@\n";
printlog( { id => $matched_record_id, op => "update", status => "ERROR" } ) if ($logfile);
@ -570,7 +570,7 @@ RECORD: foreach my $record (@{$marc_records}) {
C4::Biblio::_strip_item_fields($clone_record, $framework);
# This sets the marc fields if there was an error, and also calls
# defer_marc_save.
ModBiblioMarc($clone_record, $record_id, $modify_biblio_marc_options);
ModBiblioMarc($clone_record, $record_id, $mod_biblio_options);
if ($error_adding) {
warn "ERROR: Adding items to bib $record_id failed: $error_adding";
printlog({ id => $record_id, op => "insert items", status => "ERROR"}) if ($logfile);
@ -621,7 +621,7 @@ RECORD: foreach my $record (@{$marc_records}) {
# @FIXME: Why do we save here without stripping items? Besides,
# save with stripped items has already been performed
ModBiblioMarc($record, $record_id, $modify_biblio_marc_options);
ModBiblioMarc($record, $record_id, $mod_biblio_options);
next RECORD;
}
else {