summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-07 11:08:21 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-07 11:08:21 +0200
commit40eaf71a333267288873462a33855bd0d082f21d (patch)
tree937bda7b7049edd6a3120d79a416fa5bed67523d /lib
parent594f5b6a29c542f2563db91a4c1c6ce6287acd22 (diff)
downloadnextcloud-server-40eaf71a333267288873462a33855bd0d082f21d.tar.gz
nextcloud-server-40eaf71a333267288873462a33855bd0d082f21d.zip
Make sure the owner always has the right path
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 2dc83bdcc45..2a9fa44f78d 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -253,9 +253,6 @@ class Share extends Constants {
// Include owner in list of users, if requested
if ($includeOwner) {
$shares[] = $ownerUser;
- if ($returnUserPaths) {
- $sharePaths[$ownerUser] = $path;
- }
}
if ($returnUserPaths) {
@@ -283,6 +280,12 @@ class Share extends Constants {
}
}
+ if ($includeOwner) {
+ $sharePaths[$ownerUser] = $path;
+ } else {
+ unset($sharePaths[$ownerUser]);
+ }
+
return $sharePaths;
}