diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-29 11:27:05 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-29 11:27:05 +0100 |
commit | 9ab44f1f00715e3c4c0fe2fb6a25846e6fc7495b (patch) | |
tree | 51e19a5654fd01779bb791fcf2c96b1a9c4690f1 /lib | |
parent | 7d96f826598256106af5f8087d2077a521e88a46 (diff) | |
parent | 6feb31bf96215101e314ce2f0c03644495ad095c (diff) | |
download | nextcloud-server-9ab44f1f00715e3c4c0fe2fb6a25846e6fc7495b.tar.gz nextcloud-server-9ab44f1f00715e3c4c0fe2fb6a25846e6fc7495b.zip |
Merge pull request #11509 from owncloud/internal_email_template
Allow separate templates for internal and external share notifications
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/mailnotifications.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php index 8056260bf17..2797e5ed99b 100644 --- a/lib/private/share/mailnotifications.php +++ b/lib/private/share/mailnotifications.php @@ -136,7 +136,7 @@ class MailNotifications { $link = \OCP\Util::linkToAbsolute('files', 'index.php', $args); - list($htmlBody, $textBody) = $this->createMailBody($filename, $link, $expiration); + list($htmlBody, $textBody) = $this->createMailBody($filename, $link, $expiration, 'internal'); // send it out now try { @@ -210,20 +210,20 @@ class MailNotifications { * @param string $filename the shared file * @param string $link link to the shared file * @param int $expiration expiration date (timestamp) + * @param bool $prefix prefix of mail template files * @return array an array of the html mail body and the plain text mail body */ - private function createMailBody($filename, $link, $expiration) { - + private function createMailBody($filename, $link, $expiration, $prefix = '') { $formattedDate = $expiration ? $this->l->l('date', $expiration) : null; - $html = new \OC_Template("core", "mail", ""); + $html = new \OC_Template('core', $prefix . 'mail', ''); $html->assign ('link', $link); $html->assign ('user_displayname', $this->senderDisplayName); $html->assign ('filename', $filename); $html->assign('expiration', $formattedDate); $htmlMail = $html->fetchPage(); - $plainText = new \OC_Template("core", "altmail", ""); + $plainText = new \OC_Template('core', $prefix . 'altmail', ''); $plainText->assign ('link', $link); $plainText->assign ('user_displayname', $this->senderDisplayName); $plainText->assign ('filename', $filename); |