summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-02-11 15:23:13 +0100
committerVincent Petry <pvince81@owncloud.com>2015-02-11 15:23:13 +0100
commitfbbb9fe0fd395ef94c62609fe9ab4c908644d15d (patch)
tree885e83fde2eb667220cecfb0a76f269eb4c84337 /lib
parent0e4923b0f98db9b7c52b007b9df01c5ae7c05a47 (diff)
parentc17b236c1967bbefe7b4873e8d0dcaa77bd132f2 (diff)
downloadnextcloud-server-fbbb9fe0fd395ef94c62609fe9ab4c908644d15d.tar.gz
nextcloud-server-fbbb9fe0fd395ef94c62609fe9ab4c908644d15d.zip
Merge pull request #13979 from owncloud/group-share-collition-wrong-type-in-post-hook
Do not overwrite the shareType so the post hook is still correct
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 53479ad7144..4753f6ecbfa 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1857,7 +1857,7 @@ class Share extends \OC\Share\Constants {
$sourceId = ($itemType === 'file' || $itemType === 'folder') ? $fileSource : $itemSource;
$sourceExists = self::getItemSharedWithBySource($itemType, $sourceId, self::FORMAT_NONE, null, true, $user);
- $shareType = ($isGroupShare) ? self::$shareTypeGroupUserUnique : $shareType;
+ $userShareType = ($isGroupShare) ? self::$shareTypeGroupUserUnique : $shareType;
if ($sourceExists) {
$fileTarget = $sourceExists['file_target'];
@@ -1870,12 +1870,12 @@ class Share extends \OC\Share\Constants {
} elseif(!$sourceExists && !$isGroupShare) {
- $itemTarget = Helper::generateTarget($itemType, $itemSource, $shareType, $user,
+ $itemTarget = Helper::generateTarget($itemType, $itemSource, $userShareType, $user,
$uidOwner, $suggestedItemTarget, $parent);
if (isset($fileSource)) {
if ($parentFolder) {
if ($parentFolder === true) {
- $fileTarget = Helper::generateTarget('file', $filePath, $shareType, $user,
+ $fileTarget = Helper::generateTarget('file', $filePath, $userShareType, $user,
$uidOwner, $suggestedFileTarget, $parent);
if ($fileTarget != $groupFileTarget) {
$parentFolders[$user]['folder'] = $fileTarget;
@@ -1885,7 +1885,7 @@ class Share extends \OC\Share\Constants {
$parent = $parentFolder[$user]['id'];
}
} else {
- $fileTarget = Helper::generateTarget('file', $filePath, $shareType,
+ $fileTarget = Helper::generateTarget('file', $filePath, $userShareType,
$user, $uidOwner, $suggestedFileTarget, $parent);
}
} else {
@@ -1916,7 +1916,7 @@ class Share extends \OC\Share\Constants {
'itemType' => $itemType,
'itemSource' => $itemSource,
'itemTarget' => $itemTarget,
- 'shareType' => $shareType,
+ 'shareType' => $userShareType,
'shareWith' => $user,
'uidOwner' => $uidOwner,
'permissions' => $permissions,