diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-11 12:59:37 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-11 12:59:37 +0100 |
commit | a09df0083e6fa5c465c85d58ea04981538b41c32 (patch) | |
tree | b0caef8ded27ec8add62d69e7140c9b66cdcb428 | |
parent | 36885dc64ced99737b3eff49a623494ec3bc9e92 (diff) | |
download | nextcloud-server-a09df0083e6fa5c465c85d58ea04981538b41c32.tar.gz nextcloud-server-a09df0083e6fa5c465c85d58ea04981538b41c32.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.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php index dc95a791d29..7adbcab2f9b 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); } |