diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-01-07 18:14:53 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-01-07 18:14:53 +0100 |
commit | bfb6e350d54329bcf9ca91c0b44506a6eef13887 (patch) | |
tree | b0966a4fa905fc29866332ab549c33df7242a348 /lib/private | |
parent | 10505bdb0db4d14ce86815b57d2bca2ef880a581 (diff) | |
parent | e9e7ee67d373e138b4a9749f9e9a7847a7d3875d (diff) | |
download | nextcloud-server-bfb6e350d54329bcf9ca91c0b44506a6eef13887.tar.gz nextcloud-server-bfb6e350d54329bcf9ca91c0b44506a6eef13887.zip |
Merge pull request #13016 from owncloud/sharing_fixes
don't delete share table entries for the unique name if re-share permission was removed
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/share/helper.php | 8 |
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(); |