diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-07-22 17:39:02 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-08-13 18:10:13 +0300 |
commit | 2e04cc8e6c4749df88f21326daac6eb6634ec3b3 (patch) | |
tree | b7ac55888a1c9d5675fab391984f506c42e041ba /lib | |
parent | f897e19c946c45e5b844647ddfdffd826b001539 (diff) |
Ignore file_target when grouping shares
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/share.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 6c970f55643..3804d656dba 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -2068,10 +2068,13 @@ class Share extends Constants { foreach ($items as $item) { $grouped = false; foreach ($result as $key => $r) { - // for file/folder shares we need to compare file_source, otherwise we compare item_source + // for file/folder shares we need to compare file_source + // since we only want a single received target for the same file_source + // + // otherwise we compare item_source // only group shares if they already point to the same target, otherwise the file where shared // before grouping of shares was added. In this case we don't group them toi avoid confusions - if (( $fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) || + if (( $fileSharing && $item['file_source'] === $r['file_source']) || (!$fileSharing && $item['item_source'] === $r['item_source'] && $item['item_target'] === $r['item_target'])) { // add the first item to the list of grouped shares if (!isset($result[$key]['grouped'])) { @@ -2087,7 +2090,6 @@ class Share extends Constants { if (!$grouped) { $result[] = $item; } - } return $result; |