Allow the expiration date to be set to null
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
6a130d01e7
commit
f0c34a3e89
|
@ -370,14 +370,14 @@ class ShareByMailProvider implements IShareProvider {
|
||||||
* @param string $link
|
* @param string $link
|
||||||
* @param string $initiator
|
* @param string $initiator
|
||||||
* @param string $shareWith
|
* @param string $shareWith
|
||||||
* @param \DateTime $expiration
|
* @param \DateTime|null $expiration
|
||||||
* @throws \Exception If mail couldn't be sent
|
* @throws \Exception If mail couldn't be sent
|
||||||
*/
|
*/
|
||||||
protected function sendMailNotification($filename,
|
protected function sendMailNotification($filename,
|
||||||
$link,
|
$link,
|
||||||
$initiator,
|
$initiator,
|
||||||
$shareWith,
|
$shareWith,
|
||||||
\DateTime $expiration) {
|
$expiration) {
|
||||||
$initiatorUser = $this->userManager->get($initiator);
|
$initiatorUser = $this->userManager->get($initiator);
|
||||||
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator;
|
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator;
|
||||||
$subject = (string)$this->l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename));
|
$subject = (string)$this->l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename));
|
||||||
|
|
|
@ -868,6 +868,7 @@ class ShareByMailProviderTest extends TestCase {
|
||||||
'https://example.com/file.txt',
|
'https://example.com/file.txt',
|
||||||
'OwnerUser',
|
'OwnerUser',
|
||||||
'john@doe.com',
|
'john@doe.com',
|
||||||
|
null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -968,6 +969,7 @@ class ShareByMailProviderTest extends TestCase {
|
||||||
'https://example.com/file.txt',
|
'https://example.com/file.txt',
|
||||||
'InitiatorUser',
|
'InitiatorUser',
|
||||||
'john@doe.com',
|
'john@doe.com',
|
||||||
|
null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue