Skip to content
Snippets Groups Projects
Commit 3dabae3b authored by Thomas Hackl's avatar Thomas Hackl
Browse files

Resolve "Benachrichtigungsmail bei Forenposts verwendet nicht das Standardlayout"

Closes #5189

Merge request !3875
parent 4fd07adf
No related branches found
No related tags found
2 merge requests!4241Draft: Resolve "Im fromSORM fehlt Eingabename des `templates/forms/wysiwyg_input.php`",!3875Resolve "Benachrichtigungsmail bei Forenposts verwendet nicht das Standardlayout"
Pipeline #31063 canceled
...@@ -99,7 +99,6 @@ class ForumAbo ...@@ -99,7 +99,6 @@ class ForumAbo
return; return;
} }
$template = $GLOBALS['template_factory']->open('mail/forum_notification');// notify users
while ($data = $stmt->fetch(PDO::FETCH_ASSOC)) { while ($data = $stmt->fetch(PDO::FETCH_ASSOC)) {
$user_id = $data['user_id']; $user_id = $data['user_id'];
...@@ -135,11 +134,20 @@ class ForumAbo ...@@ -135,11 +134,20 @@ class ForumAbo
$subject = _('[Forum]') . ' ' . ($title ?: _('Neuer Beitrag')); $subject = _('[Forum]') . ' ' . ($title ?: _('Neuer Beitrag'));
$htmlMessage = $template->render( $template = $GLOBALS['template_factory']->open('mail/html');
$htmlTemplate = $GLOBALS['template_factory']->open('mail/forum_notification');
$content = $htmlTemplate->render(
compact('user_id', 'topic', 'path') compact('user_id', 'topic', 'path')
); );
$textMessage = trim(kill_format($htmlMessage)); $htmlMessage = $template->render([
'snd_fullname' => '',
'rec_fullname' => $user->getFullName(),
'message' => $content,
'attachments' => [],
]);
$textMessage = trim(kill_format($content));
$userWantsHtml = UserConfig::get($user_id)->MAIL_AS_HTML; $userWantsHtml = UserConfig::get($user_id)->MAIL_AS_HTML;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment