[Pkg-owncloud-commits] [owncloud] 60/66: only add "received_from" if a share was found
David Prévot
taffit at moszumanska.debian.org
Fri Apr 18 22:49:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v5.0.15
in repository owncloud.
commit 61bb39829e07663c66afb659bf92b204493ab6b5
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Wed Feb 26 12:52:35 2014 +0100
only add "received_from" if a share was found
---
apps/files_sharing/lib/api.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index d703ac3..64ae6bd 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);
}
}
--
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