summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-09-09 14:44:08 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-09-09 14:44:08 -0400
commit6c17a4cb77f50ce851ce8f3bc9a94f7f40967df0 (patch)
treed57bf8e495d3d52beb7797e0e8b205880cf05afa /lib
parent13d513c17c264a3bbb1b2c874bb742afbce76e10 (diff)
downloadnextcloud-server-6c17a4cb77f50ce851ce8f3bc9a94f7f40967df0.tar.gz
nextcloud-server-6c17a4cb77f50ce851ce8f3bc9a94f7f40967df0.zip
Don't display actions for children in shared collections, show the parent collection the child is shared in
Diffstat (limited to 'lib')
-rw-r--r--lib/public/share.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 3e42e91d045..6186c2d1c17 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -695,7 +695,12 @@ class Share {
if (isset($item) && $row['item_type'] == $itemType && $row[$column] == $item) {
$collectionItems[] = $row;
} else {
- $row['collection'] = array('item_type' => $row['item_type'], $column => $row[$column]);
+ $collection = array();
+ $collection['item_type'] = $row['item_type'];
+ if ($row['item_type'] == 'file' || $row['item_type'] == 'folder') {
+ $collection['path'] = basename($row['path']);
+ }
+ $row['collection'] = $collection;
// Fetch all of the children sources
$children = $collectionBackend->getChildren($row[$column]);
foreach ($children as $child) {