aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-12 11:49:40 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-16 08:54:18 +0100
commitbcf0a69af43dd60ff8e170f3a71b27367624c397 (patch)
treea016aa89875b7574a9764fbf5526489875489587
parentbaaaacd6500f815f1a699d26f3a7ba02e0ba73e7 (diff)
downloadnextcloud-server-bcf0a69af43dd60ff8e170f3a71b27367624c397.tar.gz
nextcloud-server-bcf0a69af43dd60ff8e170f3a71b27367624c397.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>
-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 ded0d13b6d0..e9895edf95a 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -408,9 +408,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'));
}