diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-12 11:49:40 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-16 15:37:12 +0100 |
commit | bae712b68eab59a8e05867f36aa1b5dc4bcbc126 (patch) | |
tree | c36b0289f57a7a2cd6ff93ef14bb03fd1de6f03f /lib | |
parent | 713e87909aaac41f9beafb514f2404409f7c9a0f (diff) | |
download | nextcloud-server-bae712b68eab59a8e05867f36aa1b5dc4bcbc126.tar.gz nextcloud-server-bae712b68eab59a8e05867f36aa1b5dc4bcbc126.zip |
Fix default internal expiration date
The default expiration date for internal shares was set from the default
link expiration date instead of the internal one.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/Manager.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 348e0207d2f..5c1db638f7a 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -402,9 +402,9 @@ class Manager implements IManager { $expirationDate = new \DateTime(); $expirationDate->setTime(0,0,0); - $days = (int)$this->config->getAppValue('core', 'internal_defaultExpDays', $this->shareApiLinkDefaultExpireDays()); - if ($days > $this->shareApiLinkDefaultExpireDays()) { - $days = $this->shareApiLinkDefaultExpireDays(); + $days = (int)$this->config->getAppValue('core', 'internal_defaultExpDays', (string)$this->shareApiInternalDefaultExpireDays()); + if ($days > $this->shareApiInternalDefaultExpireDays()) { + $days = $this->shareApiInternalDefaultExpireDays(); } $expirationDate->add(new \DateInterval('P'.$days.'D')); } |