diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-28 14:54:10 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-28 14:54:10 +0100 |
commit | 15d1df055b093ecce0c5ae52561dd73584145c7c (patch) | |
tree | 4f2b10bacfa5371e3f2a53122a3165bf94114d01 /apps/files_sharing/lib/api.php | |
parent | 65843e245996c9ecfd167be2b520bb917b32aa7e (diff) | |
parent | dd32091016481b0b6845e03ea87ce419b3cda19e (diff) | |
download | nextcloud-server-15d1df055b093ecce0c5ae52561dd73584145c7c.tar.gz nextcloud-server-15d1df055b093ecce0c5ae52561dd73584145c7c.zip |
Merge branch 'master' into display-share-owner-master
Conflicts:
apps/files_sharing/lib/cache.php
Diffstat (limited to 'apps/files_sharing/lib/api.php')
-rw-r--r-- | apps/files_sharing/lib/api.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php index 19a2d22b068..0ba58aa896a 100644 --- a/apps/files_sharing/lib/api.php +++ b/apps/files_sharing/lib/api.php @@ -172,12 +172,12 @@ class Api { // workaround because folders are named 'dir' in this context $itemType = $file['type'] === 'file' ? 'file' : 'folder'; $share = \OCP\Share::getItemShared($itemType, $file['fileid']); - $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']); - } - if ($share) { + 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']); + } $result = array_merge($result, $share); } } |