diff options
author | Joas Schilling <coding@schilljs.com> | 2017-09-15 10:59:11 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-10-18 15:12:03 +0200 |
commit | 8b37fe7f6534ad16bd9a357036e95e748e2068e3 (patch) | |
tree | c7a11a26232a0e117d0b2b3c95a2d79b7985967b /lib/private/Share20/Manager.php | |
parent | f109c1a10c9f5acf0d5d3e4f864e3702f99db937 (diff) | |
download | nextcloud-server-8b37fe7f6534ad16bd9a357036e95e748e2068e3.tar.gz nextcloud-server-8b37fe7f6534ad16bd9a357036e95e748e2068e3.zip |
Set the subject with the email template to allow theming
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r-- | lib/private/Share20/Manager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index b2e192b8309..dd2a110daeb 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -702,7 +702,6 @@ class Manager implements IManager { \DateTime $expiration = null) { $initiatorUser = $this->userManager->get($initiator); $initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; - $subject = $l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename)); $message = $this->mailer->createMessage(); @@ -714,6 +713,7 @@ class Manager implements IManager { 'shareWith' => $shareWith, ]); + $emailTemplate->setSubject($l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename))); $emailTemplate->addHeader(); $emailTemplate->addHeading($l->t('%s shared »%s« with you', [$initiatorDisplayName, $filename]), false); $text = $l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]); @@ -750,7 +750,7 @@ class Manager implements IManager { $emailTemplate->addFooter(); } - $message->setSubject($subject); + $message->setSubject($emailTemplate->renderSubject()); $message->setPlainBody($emailTemplate->renderText()); $message->setHtmlBody($emailTemplate->renderHtml()); $this->mailer->send($message); |