[Pkg-owncloud-commits] [owncloud] 22/74: only users can have a display name different from the id
David Prévot
taffit at moszumanska.debian.org
Tue Dec 2 22:04:34 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 e6e0573756e23485370b28f6455caa3edecb62b3
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Tue Nov 18 11:41:45 2014 +0100
only users can have a display name different from the id
---
lib/private/share/share.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 07c2641..b637b87 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1462,8 +1462,11 @@ class Share extends \OC\Share\Constants {
$row['permissions'] &= ~\OCP\PERMISSION_SHARE;
}
// Add display names to result
- if ( isset($row['share_with']) && $row['share_with'] != '') {
+ if ( isset($row['share_with']) && $row['share_with'] != '' &&
+ isset($row['share_with']) && $row['share_type'] === self::SHARE_TYPE_USER) {
$row['share_with_displayname'] = \OCP\User::getDisplayName($row['share_with']);
+ } else {
+ $row['share_with_displayname'] = $row['share_with'];
}
if ( isset($row['uid_owner']) && $row['uid_owner'] != '') {
$row['displayname_owner'] = \OCP\User::getDisplayName($row['uid_owner']);
--
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