From 010f15b12b2c6d2f6b862b36e81a9671fc054b10 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 26 Jun 2003 14:11:09 +0000 Subject: [PATCH] small fix for biblio modif : when modifying a biblio, fields that were left 100% empty during add were no more in the editor. Thus, it was impossible to add them forever. This 1 line fix restore correct behaviour. --- acqui.simple/addbiblio.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/acqui.simple/addbiblio.pl b/acqui.simple/addbiblio.pl index 665ff6dfd5..5ad1c3080e 100755 --- a/acqui.simple/addbiblio.pl +++ b/acqui.simple/addbiblio.pl @@ -205,14 +205,15 @@ sub build_tabs ($$$$) { my $indicator; # if MARC::Record is not empty => use it as master loop, then add missing subfields that should be in the tab. # if MARC::Record is empty => use tab as master loop. - if ($record ne -1) { + if ($record ne -1 && $record->field($tag)) { my @fields = $record->field($tag); foreach my $field (@fields) { my @subfields_data; if ($tag<10) { my $value=$field->data(); my $subfield="@"; - push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$record,$authorised_values_sth)); + push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$record,$authorised_values_sth)) + unless ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop); $i++; } else { my @subfields=$field->subfields(); -- 2.39.5