[Pkg-owncloud-commits] [owncloud] 44/134: add 'received_from' info to the share, so that every share can have a different value

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 21:43:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 3ccbc25dba674a8a7080b7a52064c1638004eed1
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 370640b..6683011 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