if ($fullId === null && $expirationDate === null && $this->shareApiInternalDefaultExpireDate()) {
$expirationDate = new \DateTime();
$expirationDate->setTime(0,0,0);
- $expirationDate->add(new \DateInterval('P'.$this->shareApiInternalDefaultExpireDays().'D'));
+
+ $days = (int)$this->config->getAppValue('core', 'internal_defaultExpDays', $this->shareApiLinkDefaultExpireDays());
+ if ($days > $this->shareApiLinkDefaultExpireDays()) {
+ $days = $this->shareApiLinkDefaultExpireDays();
+ }
+ $expirationDate->add(new \DateInterval('P'.$days.'D'));
}
// If we enforce the expiration date check that is does not exceed
if ($fullId === null && $expirationDate === null && $this->shareApiLinkDefaultExpireDate()) {
$expirationDate = new \DateTime();
$expirationDate->setTime(0,0,0);
- $expirationDate->add(new \DateInterval('P'.$this->shareApiLinkDefaultExpireDays().'D'));
+
+ $days = (int)$this->config->getAppValue('core', 'link_defaultExpDays', $this->shareApiLinkDefaultExpireDays());
+ if ($days > $this->shareApiLinkDefaultExpireDays()) {
+ $days = $this->shareApiLinkDefaultExpireDays();
+ }
+ $expirationDate->add(new \DateInterval('P'.$days.'D'));
}
// If we enforce the expiration date check that is does not exceed
['core', 'shareapi_enforce_expire_date', 'no', 'yes'],
['core', 'shareapi_expire_after_n_days', '7', '3'],
['core', 'shareapi_default_expire_date', 'no', 'yes'],
+ ['core', 'link_defaultExpDays', 3, '3'],
]);
$expected = new \DateTime();