]> source.dussan.org Git - nextcloud-server.git/commitdiff
make sure that we only remove file/folder shares
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 8 Oct 2013 13:16:33 +0000 (15:16 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 8 Oct 2013 14:00:18 +0000 (16:00 +0200)
apps/files_sharing/appinfo/update.php
apps/files_sharing/appinfo/version

index bc33dd40437ab3bbd6dd9a61193076045f4593e7..87635a10b13117b12cd0d523cc2d736cdd8d125b 100644 (file)
@@ -70,10 +70,10 @@ if (version_compare($installedVersion, '0.3', '<')) {
 }
 
 // clean up oc_share table from files which are no longer exists
-if (version_compare($installedVersion, '0.3.4', '<')) {
+if (version_compare($installedVersion, '0.3.5', '<')) {
 
        // get all shares where the original file no longer exists
-       $findShares = \OC_DB::prepare('SELECT `file_source` FROM `*PREFIX*share` LEFT JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*filecache`.`fileid` IS NULL');
+       $findShares = \OC_DB::prepare('SELECT `file_source` FROM `*PREFIX*share` LEFT JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*filecache`.`fileid` IS NULL AND `*PREFIX*share`.`item_type` IN (`file`, `folder`)');
        $sharesFound = $findShares->execute(array())->fetchAll();
 
        // delete those shares from the oc_share table
index 448a0fa11cdb5dc89bd34011f071df2a56ee44d9..09e9157034c28c1c2516f005c9306248219630c4 100644 (file)
@@ -1 +1 @@
-0.3.4
\ No newline at end of file
+0.3.5
\ No newline at end of file