Skip to content

Commit

Permalink
Merge pull request #11 from cernbox/cernbox-prod-8.2.2-link-share-exp…
Browse files Browse the repository at this point in the history
…iredate-patch

[Patch] Increasing the share expiration date limit by 1
  • Loading branch information
NadirRoGue committed May 11, 2016
2 parents 3d9ca2e + 1bd8c22 commit 77ca587
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/share/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 77ca587

Please sign in to comment.