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>
This commit is contained in:
Daniel Calviño Sánchez 2020-11-12 11:49:40 +01:00
parent baaaacd650
commit bcf0a69af4
1 changed files with 3 additions and 3 deletions

View File

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