make sure that we only remove file/folder shares

This commit is contained in:
Bjoern Schiessle 2013-10-08 15:16:33 +02:00
parent e7e53363ac
commit 68e1dd1f23
2 changed files with 3 additions and 3 deletions

View 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

View file

@ -1 +1 @@
0.3.4
0.3.5