my @contentlist;
if ($filefh){
while (my $content=<$filefh>){
- $content =~ s/[\r\n]*$//g;
+ $content =~ s/[\r\n]*$//;
push @contentlist, $content if $content;
}
}
}
+
+ # Flag to tell the template there are valid results, hidden or not
+ if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); }
# Only display the items if there are no more than 1000
if (scalar(@itemnumbers) <= 1000) {
$items_display_hashref=BuildItemsData(@itemnumbers);
my @fields_to=$marcto->field($itemtag);
foreach my $subfield ($fieldfrom->subfields()){
foreach my $field_to_update (@fields_to){
- $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1]);
+ $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1] != '' or $$subfield[1] == '0');
}
}
#warn "TO edited:",$marcto->as_formatted;