[Pkg-owncloud-commits] [owncloud] 15/55: add 'received_from' info to the share, so that every share can have a different value
David Prévot
taffit at moszumanska.debian.org
Wed Apr 23 19:51:58 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v5.0.16RC1
in repository owncloud.
commit 286799252bac3e79fd3e9ff1f2f75a3b9f18e864
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Tue Mar 11 12:59:37 2014 +0100
add 'received_from' info to the share, so that every share can have a different value
---
apps/files_sharing/lib/api.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index 1f74ccc..f0006f4 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);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list