diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-28 17:39:29 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-28 17:49:16 +0200 |
commit | be23f7e1de6bd92911cbc6e37df14e015610bdfe (patch) | |
tree | 86a23fc36107eeeefef518179a4b078ccb3eb4a9 | |
parent | 8e4085526d071b8d6032277b02c700b7cac04cc9 (diff) | |
download | nextcloud-server-be23f7e1de6bd92911cbc6e37df14e015610bdfe.tar.gz nextcloud-server-be23f7e1de6bd92911cbc6e37df14e015610bdfe.zip |
Allow the expiration date to be set to null
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | apps/sharebymail/lib/ShareByMailProvider.php | 2 | ||||
-rw-r--r-- | lib/private/Share20/Manager.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 836f230290c..c88c2fdd0f3 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -377,7 +377,7 @@ class ShareByMailProvider implements IShareProvider { $link, $initiator, $shareWith, - $expiration) { + \DateTime $expiration = null) { $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/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 7139d7646d4..ce0a0bc77f8 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -682,14 +682,14 @@ class Manager implements IManager { * @param string $link link to the file/folder * @param string $initiator user ID of share sender * @param string $shareWith email address of share receiver - * @param \DateTime $expiration + * @param \DateTime|null $expiration * @throws \Exception If mail couldn't be sent */ protected function sendMailNotification($filename, $link, $initiator, $shareWith, - \DateTime $expiration) { + \DateTime $expiration = null) { $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)); |