add 'received_from' info to the share, so that every share can have a different value

This commit is contained in:
Bjoern Schiessle 2014-03-11 12:59:37 +01:00
parent 36885dc64c
commit a09df0083e
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}