Browse Source

Use unshareItem() when unsharing expired shares.

remotes/origin/stable6
Andreas Fischer 12 years ago
committed by Morris Jobke
parent
commit
779b87d46a
  1. 4
      lib/public/share.php

4
lib/public/share.php

@ -350,7 +350,7 @@ class Share {
$now = new \DateTime();
$expirationDate = new \DateTime($row['expiration'], new \DateTimeZone('UTC'));
if ($now > $expirationDate) {
self::delete($row['id']);
self::unshareItem($row);
return false;
}
}
@ -1211,7 +1211,7 @@ class Share {
if (isset($row['expiration'])) {
$time = new \DateTime();
if ($row['expiration'] < date('Y-m-d H:i', $time->format('U') - $time->getOffset())) {
self::delete($row['id']);
self::unshareItem($row);
continue;
}
}

Loading…
Cancel
Save