--- trunk/lib/WebPAC/Normalize.pm 2005/11/12 21:21:50 38 +++ trunk/lib/WebPAC/Normalize.pm 2005/11/15 16:56:44 64 @@ -257,6 +257,8 @@ } + $log->logdie("there is no current_filename defined! Do you have filename tag in conf/normalize/?.xml") unless ($self->{'current_filename'}); + $self->{'db'}->save_ds( ds => \@ds, current_filename => $self->{'current_filename'}, @@ -538,7 +540,7 @@ if ($sf && $$rec->{$f}->[$i]->{$sf}) { $$found++ if (defined($$found)); return $$rec->{$f}->[$i]->{$sf}; - } elsif ($$rec->{$f}->[$i]) { + } elsif (! $sf && $$rec->{$f}->[$i]) { $$found++ if (defined($$found)); # it still might have subfield, just # not specified, so we'll dump all @@ -551,6 +553,8 @@ } else { return $$rec->{$f}->[$i]; } + } else { + return ''; } } else { return '';