diff options
author | Björn Schießle <bjoern@schiessle.org> | 2015-04-09 14:51:15 +0200 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2015-04-09 14:51:15 +0200 |
commit | 0710db77bc59e296309e24773ffa6e77ef22991a (patch) | |
tree | 7fb9bf0155692451afdb30268f4d9ab48d80e917 /lib/private | |
parent | 1d9bd3d31e26d7a43940e0048199ea86a621cc57 (diff) | |
parent | 2e34db2bb357c018d2ca551c6b0ec625d662918d (diff) | |
download | nextcloud-server-0710db77bc59e296309e24773ffa6e77ef22991a.tar.gz nextcloud-server-0710db77bc59e296309e24773ffa6e77ef22991a.zip |
Merge pull request #13896 from owncloud/share-generatetarget-remove-exclude
Dont create exclude list for generating the share target
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/share/helper.php | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php index 5345c8a018f..65167dd7549 100644 --- a/lib/private/share/helper.php +++ b/lib/private/share/helper.php @@ -50,34 +50,19 @@ class Helper extends \OC\Share\Constants { } return $backend->generateTarget($itemSource, false); } else { - if ($itemType == 'file' || $itemType == 'folder') { - $column = 'file_target'; - $columnSource = 'file_source'; - } else { - $column = 'item_target'; - $columnSource = 'item_source'; - } if ($shareType == self::SHARE_TYPE_USER) { // Share with is a user, so set share type to user and groups $shareType = self::$shareTypeUserAndGroups; } - $exclude = array(); - - $result = \OCP\Share::getItemsSharedWithUser($itemType, $shareWith); - foreach ($result as $row) { - if ($row['permissions'] > 0) { - $exclude[] = $row[$column]; - } - } // Check if suggested target exists first if (!isset($suggestedTarget)) { $suggestedTarget = $itemSource; } if ($shareType == self::SHARE_TYPE_GROUP) { - $target = $backend->generateTarget($suggestedTarget, false, $exclude); + $target = $backend->generateTarget($suggestedTarget, false); } else { - $target = $backend->generateTarget($suggestedTarget, $shareWith, $exclude); + $target = $backend->generateTarget($suggestedTarget, $shareWith); } return $target; |