From: Andreas Fischer Date: Mon, 23 Sep 2013 14:48:02 +0000 (+0200) Subject: Use unshareItem() when unsharing expired shares. X-Git-Tag: v6.0.0beta3~21^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=779b87d46aff59205cebe058bf66cd5b3acb22e4;p=nextcloud-server.git Use unshareItem() when unsharing expired shares. --- diff --git a/lib/public/share.php b/lib/public/share.php index 2a127976469..48dedd07c0c 100644 --- a/lib/public/share.php +++ b/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; } }