[Pkg-owncloud-commits] [owncloud] 04/38: Do not overwrite the shareType so the post hook is still correct

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:16:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 0c3204c7a6d699f5135fb793686cd0495d729669
Author: Joas Schilling <nickvergessen at gmx.de>
Date:   Mon Feb 9 12:59:29 2015 +0100

    Do not overwrite the shareType so the post hook is still correct
    
    Conflicts:
    	lib/private/share/share.php
---
 lib/private/share/share.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 00c7bed..9dc831d 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,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list