aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-06-05 20:09:55 +0200
committerLukas Reschke <lukas@owncloud.com>2015-06-05 20:09:55 +0200
commitca10ee4d0dd64cd1b976e89c6d81f4266427e9d6 (patch)
tree1e72e9cbd4462e0f751fbc5a4f4e5c98de114e70 /lib
parent3b188d0b72fb003adc83a8b5e24f49d6ebd6b332 (diff)
parent62ae39208a0deed71d4cd373c6822946fd489586 (diff)
downloadnextcloud-server-ca10ee4d0dd64cd1b976e89c6d81f4266427e9d6.tar.gz
nextcloud-server-ca10ee4d0dd64cd1b976e89c6d81f4266427e9d6.zip
Merge pull request #16771 from owncloud/fix-storage-full-message
Add owner to the storage stats to enable better notifications
Diffstat (limited to 'lib')
-rw-r--r--lib/private/helper.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 981447c213b..f4de5b0d9f8 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -1008,7 +1008,21 @@ class OC_Helper {
$relative = 0;
}
- return array('free' => $free, 'used' => $used, 'total' => $total, 'relative' => $relative);
+ $ownerId = $storage->getOwner($path);
+ $ownerDisplayName = '';
+ $owner = \OC::$server->getUserManager()->get($ownerId);
+ if($owner) {
+ $ownerDisplayName = $owner->getDisplayName();
+ }
+
+ return [
+ 'free' => $free,
+ 'used' => $used,
+ 'total' => $total,
+ 'relative' => $relative,
+ 'owner' => $ownerId,
+ 'ownerDisplayName' => $ownerDisplayName,
+ ];
}
/**