summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-03-11 12:59:37 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-03-11 17:10:13 +0100
commit286799252bac3e79fd3e9ff1f2f75a3b9f18e864 (patch)
tree0ea90b8c9062c90589a2a63293c3da1df838a591
parent013ec9a6e311efa84a72eb65f976b77c8da9e522 (diff)
downloadnextcloud-server-286799252bac3e79fd3e9ff1f2f75a3b9f18e864.tar.gz
nextcloud-server-286799252bac3e79fd3e9ff1f2f75a3b9f18e864.zip
add 'received_from' info to the share, so that every share can have a different value
-rw-r--r--apps/files_sharing/lib/api.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index 1f74ccc396b..f0006f49dea 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -175,8 +175,10 @@ class Api {
if($share) {
$receivedFrom = \OCP\Share::getItemSharedWithBySource($itemType, $file['fileid']);
if ($receivedFrom) {
- $share['received_from'] = $receivedFrom['uid_owner'];
- $share['received_from_displayname'] = \OCP\User::getDisplayName($receivedFrom['uid_owner']);
+ reset($share);
+ $key = key($share);
+ $share[$key]['received_from'] = $receivedFrom['uid_owner'];
+ $share[$key]['received_from_displayname'] = \OCP\User::getDisplayName($receivedFrom['uid_owner']);
}
$result = array_merge($result, $share);
}