Skip to content

Commit

Permalink
Merge pull request #1202 from ikedas/ldidry/1174-followup by ldidry &…
Browse files Browse the repository at this point in the history
… ikedas

Some more changes to ldidry/1174 followup
  • Loading branch information
ikedas authored Jun 28, 2021
2 parents 505d515 + 12194be commit 136bc0b
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions src/lib/Sympa/Message.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1527,19 +1527,8 @@ sub _merge_msg {
return $entity;
}

## PARSAGE ##

my $message_output;
unless (
defined(
$message_output =
personalize_text($utf8_body, $list, $rcpt, $data)
)
) {
$log->syslog('err', 'Error merging message');
return undef;
}
$utf8_body = $message_output;
$utf8_body = personalize_text($utf8_body, $list, $rcpt, $data);
return $entity unless defined $utf8_body;

## Data not encodable by original charset will fallback to UTF-8.
my ($newcharset, $newenc);
Expand Down Expand Up @@ -1625,7 +1614,7 @@ sub personalize_text {
)
) {
$log->syslog(
'err',
'info',
'Failed parsing template: %s',
$template->{last_error}
);
Expand Down Expand Up @@ -1815,11 +1804,7 @@ sub _footer_text {
}
if ($mode) {
$footer_text =
personalize_text($footer_text, $list, $rcpt, $data);
unless (defined $footer_text) {
$log->syslog('info', 'Error personalizing %s', $type);
$footer_text = '';
}
personalize_text($footer_text, $list, $rcpt, $data) // '';
}
$footer_text = '' unless $footer_text =~ /\S/;
}
Expand Down

0 comments on commit 136bc0b

Please sign in to comment.