summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-12 11:49:40 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-11-16 13:20:11 +0000
commitdd70a20da0a59c5af847ca9df3acaa783bb1a7c4 (patch)
tree0f9e6fe16a2e56b0675d6394340b73b7c3a524c1 /lib
parentca133ea2cc08fd0e6df4608d63e9f3f7be95de39 (diff)
downloadnextcloud-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.php6
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'));
}