From 1bd8c229ec4759dfc2ca1e86542f76dbc5826112 Mon Sep 17 00:00:00 2001 From: NadirRoGue Date: Wed, 11 May 2016 15:13:45 +0200 Subject: [PATCH] [Patch] Increasing the share expiration date limit by 1 This will avoid the problems caused by missmatches between users computer clock and server clock --- lib/private/share/share.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 81fa50e58286..3f66435adf18 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1270,7 +1270,8 @@ private static function validateExpireDate($expireDate, $shareTime, $itemType, $ // initialize max date with share time $maxDate = new \DateTime(); $maxDate->setTimestamp($shareTime); - $maxDays = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7'); + // '+1' CERNBOX PATCH TO FIX LINK BY SHARE EXPIRATION DATE SET AROUND MIDNIGTH https://github.com/owncloud/core/issues/24533 + $maxDays = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7') + 1; $maxDate->add(new \DateInterval('P' . $maxDays . 'D')); if ($date > $maxDate) { $warning = 'Cannot set expiration date. Shares cannot expire later than ' . $maxDays . ' after they have been shared';