Merge pull request #6288 from nextcloud/master-6287

Allow the expiration date to be set to null
This commit is contained in:
Morris Jobke 2017-08-29 11:32:11 +02:00 committed by GitHub
commit 8c917cbfe0
2 changed files with 3 additions and 3 deletions

View File

@ -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));

View File

@ -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));