summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-09 12:59:29 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-02-09 12:59:29 +0100
commit31b93ac19a2ce3a957ee2f3cac03dc0590261f08 (patch)
tree42fe31af826767566ea806e842ee21aa26b9d3cf /lib
parente2d4b3c1235dccef4c2da553d683d782fe0e0dc9 (diff)
downloadnextcloud-server-31b93ac19a2ce3a957ee2f3cac03dc0590261f08.tar.gz
nextcloud-server-31b93ac19a2ce3a957ee2f3cac03dc0590261f08.zip
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 bd21bdd4b3a..9c3c6a2d3af 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1850,7 +1850,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'];
@@ -1863,12 +1863,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;
@@ -1878,7 +1878,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 {
@@ -1909,7 +1909,7 @@ class Share extends \OC\Share\Constants {
'itemType' => $itemType,
'itemSource' => $itemSource,
'itemTarget' => $itemTarget,
- 'shareType' => $shareType,
+ 'shareType' => $userShareType,
'shareWith' => $user,
'uidOwner' => $uidOwner,
'permissions' => $permissions,