From 5f462ec6f71b82ec334aeef402d98ed7207dcbd7 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sat, 6 Oct 2012 18:13:11 -0400 Subject: [PATCH] Fix - "Correct checking item source for share from same owner when generating item target" --- lib/public/share.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/public/share.php b/lib/public/share.php index e0488b8faf6..59dbad035aa 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1015,8 +1015,14 @@ class Share { continue; } } - if ($item['uid_owner'] == $uidOwner && $item[$columnSource] == $itemSource) { - return $target; + if ($item['uid_owner'] == $uidOwner) { + if ($itemType == 'file' || $itemType == 'folder') { + if ($item['file_source'] == \OC_FileCache::getId($itemSource)) { + return $target; + } + } else if ($item['item_source'] == $itemSource) { + return $target; + } } } if (!isset($exclude)) {