summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-26 11:47:35 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-08-26 17:57:24 +0200
commitf0c34a3e89907cab471dcc35b9eebae8d60ca598 (patch)
treec89774540df2ffe847ef80b7cab71509dcbfa4be /apps
parent6a130d01e7ec5d306533a6cdcc7079c049c40f22 (diff)
downloadnextcloud-server-f0c34a3e89907cab471dcc35b9eebae8d60ca598.tar.gz
nextcloud-server-f0c34a3e89907cab471dcc35b9eebae8d60ca598.zip
Allow the expiration date to be set to null
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php4
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 5538a94bee2..836f230290c 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -370,14 +370,14 @@ class ShareByMailProvider implements IShareProvider {
* @param string $link
* @param string $initiator
* @param string $shareWith
- * @param \DateTime $expiration
+ * @param \DateTime|null $expiration
* @throws \Exception If mail couldn't be sent
*/
protected function sendMailNotification($filename,
$link,
$initiator,
$shareWith,
- \DateTime $expiration) {
+ $expiration) {
$initiatorUser = $this->userManager->get($initiator);
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator;
$subject = (string)$this->l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename));
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index e649a9dbd0b..9ab9dbef4a1 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -868,6 +868,7 @@ class ShareByMailProviderTest extends TestCase {
'https://example.com/file.txt',
'OwnerUser',
'john@doe.com',
+ null,
]);
}
@@ -968,6 +969,7 @@ class ShareByMailProviderTest extends TestCase {
'https://example.com/file.txt',
'InitiatorUser',
'john@doe.com',
+ null,
]);
}
}