summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-12-23 17:10:05 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2015-01-07 16:36:13 +0100
commitb6f63e9b3d8554e1d7ed45a4dbc224a38bc7dfa8 (patch)
tree09ca64a72ef19940a1e73ccdcd43c68227164d6a /lib
parent40330bf4927b5b9bcfcfe5833f13d575c1ee18d4 (diff)
downloadnextcloud-server-b6f63e9b3d8554e1d7ed45a4dbc224a38bc7dfa8.tar.gz
nextcloud-server-b6f63e9b3d8554e1d7ed45a4dbc224a38bc7dfa8.zip
don't delete share table entries for the unique name if re-share permission was removed
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/helper.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php
index 3d20ba2d27f..5b27f0e6f50 100644
--- a/lib/private/share/helper.php
+++ b/lib/private/share/helper.php
@@ -96,12 +96,12 @@ class Helper extends \OC\Share\Constants {
// finding and deleting the reshares by a single user of a group share
if (count($ids) == 1 && isset($uidOwner)) {
$query = \OC_DB::prepare('SELECT `id`, `share_with`, `item_type`, `share_type`, `item_target`, `file_target`, `parent`'
- .' FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') AND `uid_owner` = ?');
- $result = $query->execute(array($uidOwner));
+ .' FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') AND `uid_owner` = ? AND `share_type` != ?');
+ $result = $query->execute(array($uidOwner, self::$shareTypeGroupUserUnique));
} else {
$query = \OC_DB::prepare('SELECT `id`, `share_with`, `item_type`, `share_type`, `item_target`, `file_target`, `parent`, `uid_owner`'
- .' FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.')');
- $result = $query->execute();
+ .' FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') AND `share_type` != ?');
+ $result = $query->execute(array(self::$shareTypeGroupUserUnique));
}
// Reset parents array, only go through loop again if items are found
$parents = array();