add 'received_from' info to the share, so that every share can have a different value
This commit is contained in:
parent
36885dc64c
commit
a09df0083e
1 changed files with 4 additions and 2 deletions
|
@ -175,8 +175,10 @@ class Api {
|
||||||
if($share) {
|
if($share) {
|
||||||
$receivedFrom = \OCP\Share::getItemSharedWithBySource($itemType, $file['fileid']);
|
$receivedFrom = \OCP\Share::getItemSharedWithBySource($itemType, $file['fileid']);
|
||||||
if ($receivedFrom) {
|
if ($receivedFrom) {
|
||||||
$share['received_from'] = $receivedFrom['uid_owner'];
|
reset($share);
|
||||||
$share['received_from_displayname'] = \OCP\User::getDisplayName($receivedFrom['uid_owner']);
|
$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);
|
$result = array_merge($result, $share);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue