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:
parent
ca133ea2cc
commit
dd70a20da0
|
@ -409,9 +409,9 @@ class Manager implements IManager {
|
||||||
$expirationDate = new \DateTime();
|
$expirationDate = new \DateTime();
|
||||||
$expirationDate->setTime(0,0,0);
|
$expirationDate->setTime(0,0,0);
|
||||||
|
|
||||||
$days = (int)$this->config->getAppValue('core', 'internal_defaultExpDays', $this->shareApiLinkDefaultExpireDays());
|
$days = (int)$this->config->getAppValue('core', 'internal_defaultExpDays', (string)$this->shareApiInternalDefaultExpireDays());
|
||||||
if ($days > $this->shareApiLinkDefaultExpireDays()) {
|
if ($days > $this->shareApiInternalDefaultExpireDays()) {
|
||||||
$days = $this->shareApiLinkDefaultExpireDays();
|
$days = $this->shareApiInternalDefaultExpireDays();
|
||||||
}
|
}
|
||||||
$expirationDate->add(new \DateInterval('P'.$days.'D'));
|
$expirationDate->add(new \DateInterval('P'.$days.'D'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue