summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-02-04 17:08:03 +0100
committerRobin Appelman <icewind@owncloud.com>2015-02-04 17:08:03 +0100
commit2e34db2bb357c018d2ca551c6b0ec625d662918d (patch)
treebc92a8ae2cde90540bba7e0b15387741456f8f59 /lib
parent09216ef49b04f2a37d853d160853d15741bbe015 (diff)
downloadnextcloud-server-2e34db2bb357c018d2ca551c6b0ec625d662918d.tar.gz
nextcloud-server-2e34db2bb357c018d2ca551c6b0ec625d662918d.zip
Dont create exclude list for generating the share target
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/helper.php19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php
index 6059af0196d..7993498a0e8 100644
--- a/lib/private/share/helper.php
+++ b/lib/private/share/helper.php
@@ -44,34 +44,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;