summaryrefslogtreecommitdiffstats
path: root/lib/private/share/mailnotifications.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-02 14:04:27 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-02 21:42:14 +0100
commitdcc7ff09ba4cfba6fe200f4f686cca7a1853390c (patch)
tree348352422c29c0bdbfbde3f05e8e041c5c0b03a6 /lib/private/share/mailnotifications.php
parenteebe2b9c239a7f9e7e127f52ab4b9e97763b0149 (diff)
downloadnextcloud-server-dcc7ff09ba4cfba6fe200f4f686cca7a1853390c.tar.gz
nextcloud-server-dcc7ff09ba4cfba6fe200f4f686cca7a1853390c.zip
Adding unit test for MailNotifications::sendInternalShareMail()
Diffstat (limited to 'lib/private/share/mailnotifications.php')
-rw-r--r--lib/private/share/mailnotifications.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php
index c7747fd38c1..f45d80b37ca 100644
--- a/lib/private/share/mailnotifications.php
+++ b/lib/private/share/mailnotifications.php
@@ -99,7 +99,7 @@ class MailNotifications {
continue;
}
- $items = \OCP\Share::getItemSharedWithUser($itemType, $itemSource, $recipient);
+ $items = $this->getItemSharedWithUser($itemSource, $itemType, $recipient);
$filename = trim($items[0]['file_target'], '/');
$subject = (string) $this->l->t('%s shared »%s« with you', array($this->senderDisplayName, $filename));
$expiration = null;
@@ -130,7 +130,7 @@ class MailNotifications {
);
}
- $link = \OCP\Util::linkToAbsolute('files', 'index.php', $args);
+ $link = Util::linkToAbsolute('files', 'index.php', $args);
list($htmlBody, $textBody) = $this->createMailBody($filename, $link, $expiration, 'internal');
@@ -142,7 +142,7 @@ class MailNotifications {
$message->setHtmlBody($htmlBody);
$message->setPlainBody($textBody);
$message->setFrom([
- \OCP\Util::getDefaultEmailAddress('sharing-noreply') =>
+ Util::getDefaultEmailAddress('sharing-noreply') =>
(string)$this->l->t('%s via %s', [
$this->senderDisplayName,
$this->defaults->getName()
@@ -183,7 +183,7 @@ class MailNotifications {
$message->setHtmlBody($htmlBody);
$message->setPlainBody($textBody);
$message->setFrom([
- \OCP\Util::getDefaultEmailAddress('sharing-noreply') =>
+ Util::getDefaultEmailAddress('sharing-noreply') =>
(string)$this->l->t('%s via %s', [
$this->senderDisplayName,
$this->defaults->getName()
@@ -206,7 +206,7 @@ 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
+ * @param string $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, $prefix = '') {