diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-12 11:49:40 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-11-16 13:20:11 +0000 |
commit | dd70a20da0a59c5af847ca9df3acaa783bb1a7c4 (patch) | |
tree | 0f9e6fe16a2e56b0675d6394340b73b7c3a524c1 /lib | |
parent | ca133ea2cc08fd0e6df4608d63e9f3f7be95de39 (diff) | |
download | nextcloud-server-dd70a20da0a59c5af847ca9df3acaa783bb1a7c4.tar.gz nextcloud-server-dd70a20da0a59c5af847ca9df3acaa783bb1a7c4.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 18f26434857..35374fd167c 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -409,9 +409,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')); } |