diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-02-09 14:59:29 +0300 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-09 18:26:29 +0300 |
commit | 0c3204c7a6d699f5135fb793686cd0495d729669 (patch) | |
tree | 4b2b8f99c52bec1494fee02b8f3781b47d88be7e /lib/private | |
parent | c2a72ce6b0b7cf21cced68a7203d22048c5d4679 (diff) |
Do not overwrite the shareType so the post hook is still correct
Conflicts:
lib/private/share/share.php
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/share/share.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 00c7bed976c..9dc831dd37f 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1738,7 +1738,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']; @@ -1751,12 +1751,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; @@ -1766,7 +1766,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 { @@ -1797,7 +1797,7 @@ class Share extends \OC\Share\Constants { 'itemType' => $itemType, 'itemSource' => $itemSource, 'itemTarget' => $itemTarget, - 'shareType' => $shareType, + 'shareType' => $userShareType, 'shareWith' => $user, 'uidOwner' => $uidOwner, 'permissions' => $permissions, |