summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorPellaeon Lin <nfsmwlin@gmail.com>2013-12-11 12:17:28 +0800
committerPellaeon Lin <nfsmwlin@gmail.com>2013-12-11 12:18:18 +0800
commit0aa38165a4659fedd98f752bdd99bf174ed98a76 (patch)
tree1b0e45dd71546e1d983641aad2d6c0f2bf627984 /apps/files/lib
parent64bf0fa47fe4c623672cf86e831f66974e7f650c (diff)
downloadnextcloud-server-0aa38165a4659fedd98f752bdd99bf174ed98a76.tar.gz
nextcloud-server-0aa38165a4659fedd98f752bdd99bf174ed98a76.zip
Update #free_space on getstoragestats AJAX call
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/helper.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index eaff28178ea..2f4a9790662 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -6,6 +6,7 @@ class Helper
{
public static function buildFileStorageStatistics($dir) {
$l = new \OC_L10N('files');
+ $freeSpace=OCP\Util::freeSpace($dir);
$maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir);
$maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
@@ -15,6 +16,7 @@ class Helper
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,
+ 'freeSpace' => $freeSpace,
'usedSpacePercent' => (int)$storageInfo['relative']);
}