]> source.dussan.org Git - nextcloud-server.git/commitdiff
always use the correct share type
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 21 Oct 2014 14:19:54 +0000 (16:19 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Wed, 22 Oct 2014 09:48:29 +0000 (11:48 +0200)
lib/private/share/share.php

index b827b84a9bc5552bd79136aea5fe806ba4853f65..48b1a53162109b3f732cfec0a9fde8b5688cdab6 100644 (file)
@@ -1781,12 +1781,12 @@ class Share extends \OC\Share\Constants {
 
                        } elseif(!$sourceExists && !$isGroupShare)  {
 
-                               $itemTarget = Helper::generateTarget($itemType, $itemSource, self::SHARE_TYPE_USER, $user,
+                               $itemTarget = Helper::generateTarget($itemType, $itemSource, $shareType, $user,
                                        $uidOwner, $suggestedItemTarget, $parent);
                                if (isset($fileSource)) {
                                        if ($parentFolder) {
                                                if ($parentFolder === true) {
-                                                       $fileTarget = Helper::generateTarget('file', $filePath, self::SHARE_TYPE_USER, $user,
+                                                       $fileTarget = Helper::generateTarget('file', $filePath, $shareType, $user,
                                                                $uidOwner, $suggestedFileTarget, $parent);
                                                        if ($fileTarget != $groupFileTarget) {
                                                                $parentFolders[$user]['folder'] = $fileTarget;
@@ -1796,7 +1796,7 @@ class Share extends \OC\Share\Constants {
                                                        $parent = $parentFolder[$user]['id'];
                                                }
                                        } else {
-                                               $fileTarget = Helper::generateTarget('file', $filePath, self::SHARE_TYPE_USER,
+                                               $fileTarget = Helper::generateTarget('file', $filePath, $shareType,
                                                        $user, $uidOwner, $suggestedFileTarget, $parent);
                                        }
                                } else {