mirror of
https://github.com/nextcloud/server.git
synced 2026-03-08 00:11:03 -05:00
Use unshareItem() when unsharing expired shares.
This commit is contained in:
parent
ebf1694795
commit
779b87d46a
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue