diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-04-10 17:21:52 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-04-10 17:30:07 +0200 |
commit | e3ad99d2523e8614b6d84765fc16104b86e9730a (patch) | |
tree | ff91239dbd59dc3953e6999222b1e0a97207d735 /core | |
parent | a881218fc25c1f650e7b381e3acf2007fdc45c38 (diff) | |
download | nextcloud-server-e3ad99d2523e8614b6d84765fc16104b86e9730a.tar.gz nextcloud-server-e3ad99d2523e8614b6d84765fc16104b86e9730a.zip |
Add "Reply-To" support to sharing mails and refactor code
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/share.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index bc83c41642c..d9bf97d6464 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -119,7 +119,14 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo // don't send a mail to the user who shared the file $recipientList = array_diff($recipientList, array(\OCP\User::getUser())); - $mailNotification = new OC\Share\MailNotifications(); + $mailNotification = new \OC\Share\MailNotifications( + \OC::$server->getUserSession()->getUser()->getUID(), + \OC::$server->getConfig(), + \OC::$server->getL10N('lib'), + \OC::$server->getMailer(), + \OC::$server->getLogger(), + $defaults + ); $result = $mailNotification->sendInternalShareMail($recipientList, $itemSource, $itemType); \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, $recipient, true); @@ -151,7 +158,14 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo $file = (string)$_POST['file']; $to_address = (string)$_POST['toaddress']; - $mailNotification = new \OC\Share\MailNotifications(); + $mailNotification = new \OC\Share\MailNotifications( + \OC::$server->getUserSession()->getUser()->getUID(), + \OC::$server->getConfig(), + \OC::$server->getL10N('lib'), + \OC::$server->getMailer(), + \OC::$server->getLogger(), + $defaults + ); $expiration = null; if (isset($_POST['expiration']) && $_POST['expiration'] !== '') { |