]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use unshareItem() when unsharing expired shares.
authorAndreas Fischer <bantu@owncloud.com>
Mon, 23 Sep 2013 14:48:02 +0000 (16:48 +0200)
committerMorris Jobke <morris.jobke@gmail.com>
Sun, 3 Nov 2013 11:33:34 +0000 (12:33 +0100)
lib/public/share.php

index 2a12797646964eb6ad3ffa89e0705876f577889a..48dedd07c0c80edd5c213a22f03efceb4d78d1dd 100644 (file)
@@ -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;
                                }
                        }