From 64a5e7ef56d35fb88c34c3c474367786fbdd5e47 Mon Sep 17 00:00:00 2001 From: Henrik Date: Sun, 21 Jun 2020 19:36:43 +0200 Subject: [PATCH] Added standard notification footer to comment_mail template --- app/Controller/CommentMailController.php | 6 +++--- app/Template/comment_mail/email.php | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Controller/CommentMailController.php b/app/Controller/CommentMailController.php index 949470278..920f786a5 100644 --- a/app/Controller/CommentMailController.php +++ b/app/Controller/CommentMailController.php @@ -34,7 +34,7 @@ class CommentMailController extends BaseController list($valid, $errors) = $this->commentValidator->validateEmailCreation($values); if ($valid) { - $this->sendByEmail($values); + $this->sendByEmail($values, $task); $values = $this->prepareComment($values); if ($this->commentModel->create($values) !== false) { @@ -49,9 +49,9 @@ class CommentMailController extends BaseController } } - protected function sendByEmail(array $values) + protected function sendByEmail(array $values, array $task) { - $html = $this->template->render('comment_mail/email', array('email' => $values)); + $html = $this->template->render('comment_mail/email', array('email' => $values, 'task' => $task)); $emails = explode_csv_field($values['emails']); foreach ($emails as $email) { diff --git a/app/Template/comment_mail/email.php b/app/Template/comment_mail/email.php index a89284f4c..612fbb2da 100644 --- a/app/Template/comment_mail/email.php +++ b/app/Template/comment_mail/email.php @@ -1 +1,3 @@ text->markdown($email['comment'], true) ?> + +render('notification/footer', array('task' => $task)) ?>