if (%$substitute) {
while ( my ($token, $val) = each %$substitute ) {
+ $val //= q{};
if ( $token eq 'items.content' ) {
$val =~ s|\n|<br/>|g if $letter->{is_html};
}
($table eq 'serial') ? "SELECT * FROM $table WHERE serialid = ?" :
($table eq 'problem_reports') ? "SELECT * FROM $table WHERE reportid = ?" :
($table eq 'additional_contents' || $table eq 'opac_news') ? "SELECT * FROM additional_contents WHERE idnew = ?" :
- ($table eq 'recalls') ? "SELECT * FROM $table WHERE id = ?" :
+ ($table eq 'recalls') ? "SELECT * FROM $table WHERE recall_id = ?" :
undef ;
unless ($query) {
warn "ERROR: No _parseletter_sth query for table '$table'";
$dateonly = $1 unless $dateonly;
}
my $replacedby_date = eval {
- output_pref({ dt => dt_from_string( $replacedby ), dateonly => $dateonly });
+ output_pref({ dt => scalar dt_from_string( $replacedby ), dateonly => $dateonly });
};
+ $replacedby_date //= q{};
if ( $letter->{ $letter_field } ) {
$letter->{ $letter_field } =~ s/\Q<<$table.$field$filter_string_used>>\E/$replacedby_date/g;