зеркало из https://github.com/nextcloud/guests.git
Родитель
cd6dc1bbc0
Коммит
ed89a14e5f
|
@ -147,8 +147,7 @@ class Mail {
|
|||
$link = Util::linkToAbsolute('files', 'index.php', $args);
|
||||
|
||||
list($htmlBody, $textBody) = $this->createMailBody(
|
||||
$filename, $link, $passwordLink,
|
||||
$this->defaults->getName(), $senderDisplayName, $expiration
|
||||
$filename, $link, $passwordLink, $this->defaults->getName(), $senderDisplayName, $expiration, $shareWithEmail
|
||||
);
|
||||
|
||||
try {
|
||||
|
@ -221,9 +220,10 @@ class Mail {
|
|||
* @param string $filename the shared file
|
||||
* @param string $link link to the shared file
|
||||
* @param int $expiration expiration date (timestamp)
|
||||
* @param string $guestEmail
|
||||
* @return array an array of the html mail body and the plain text mail body
|
||||
*/
|
||||
private function createMailBody($filename, $link, $passwordLink, $cloudName, $displayName, $expiration) {
|
||||
private function createMailBody($filename, $link, $passwordLink, $cloudName, $displayName, $expiration, $guestEmail) {
|
||||
|
||||
$formattedDate = $expiration ? $this->l10n->l('date', $expiration) : null;
|
||||
|
||||
|
@ -234,6 +234,7 @@ class Mail {
|
|||
$html->assign ('user_displayname', $displayName);
|
||||
$html->assign ('filename', $filename);
|
||||
$html->assign('expiration', $formattedDate);
|
||||
$html->assign('guestEmail', $guestEmail);
|
||||
$htmlMail = $html->fetchPage();
|
||||
|
||||
$plainText = new \OC_Template('guests', 'mail/altinvite');
|
||||
|
@ -243,6 +244,7 @@ class Mail {
|
|||
$plainText->assign ('user_displayname', $displayName);
|
||||
$plainText->assign ('filename', $filename);
|
||||
$plainText->assign('expiration', $formattedDate);
|
||||
$plainText->assign('guestEmail', $guestEmail);
|
||||
$plainTextMail = $plainText->fetchPage();
|
||||
|
||||
return [$htmlMail, $plainTextMail];
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
print_unescaped($l->t("Hey there,\n\njust letting you know that %s shared %s with you.\n\nActivate your guest account at %s by setting a password: %s\n\nThen view it: %s\n\n", array($_['user_displayname'], $_['filename'], $_['cloud_name'], $_['password_link'], $_['link'])));
|
||||
print_unescaped($l->t("Hey there,\n\njust letting you know that %s shared %s with you.\n\nActivate your guest account at %s by setting a password: %s\n\nThen view it: %s\n\nYou can login using the email address "%s".\n\n", array($_['user_displayname'], $_['filename'], $_['cloud_name'], $_['password_link'], $_['link'], $_['guestEmail'])));
|
||||
if ( isset($_['expiration']) ) {
|
||||
print_unescaped($l->t("The share will expire on %s.", array($_['expiration'])));
|
||||
print_unescaped("\n\n");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
|
||||
* @author Ilja Neumann <ineumann@owncloud.com>
|
||||
*
|
||||
* @copyright Copyright (c) 2017, ownCloud GmbH
|
||||
* @license AGPL-3.0
|
||||
|
@ -33,7 +34,15 @@
|
|||
<td width="20px"> </td>
|
||||
<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
|
||||
<?php
|
||||
print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><br>Activate your guest account at %s by <a href="%s">setting a password</a>.<br><br>Then <a href="%s">view it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['cloud_name'], $_['password_link'], $_['link'])));
|
||||
print_unescaped($l->t(
|
||||
'Hey there,<br><br>
|
||||
|
||||
just letting you know that %s shared <strong>%s</strong> with you.<br><br>
|
||||
Activate your guest account at %s by <a href="%s">setting a password</a>.<br><br>
|
||||
Then <a href="%s">view it!</a><br><br>You can login using the email address <strong>"%s"</strong> .<br><br>',
|
||||
[$_['user_displayname'], $_['filename'], $_['cloud_name'], $_['password_link'], $_['link'], $_['guestEmail']]
|
||||
));
|
||||
|
||||
if ( isset($_['expiration']) ) {
|
||||
p($l->t("The share will expire on %s.", array($_['expiration'])));
|
||||
print_unescaped('<br><br>');
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
|
||||
* @author Ilja Neumann <ineumann@butonic.de>
|
||||
*
|
||||
* @copyright Copyright (c) 2017, ownCloud GmbH
|
||||
* @license AGPL-3.0
|
||||
|
|
Загрузка…
Ссылка в новой задаче