diff options
author | Pellaeon Lin <nfsmwlin@gmail.com> | 2013-12-11 12:17:28 +0800 |
---|---|---|
committer | Pellaeon Lin <nfsmwlin@gmail.com> | 2013-12-11 12:18:18 +0800 |
commit | 0aa38165a4659fedd98f752bdd99bf174ed98a76 (patch) | |
tree | 1b0e45dd71546e1d983641aad2d6c0f2bf627984 /apps/files | |
parent | 64bf0fa47fe4c623672cf86e831f66974e7f650c (diff) | |
download | nextcloud-server-0aa38165a4659fedd98f752bdd99bf174ed98a76.tar.gz nextcloud-server-0aa38165a4659fedd98f752bdd99bf174ed98a76.zip |
Update #free_space on getstoragestats AJAX call
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/files.js | 1 | ||||
-rw-r--r-- | apps/files/lib/helper.php | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index fdaa3aa3342..0a2f1aef013 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -41,6 +41,7 @@ Files={ } if (response.data !== undefined && response.data.uploadMaxFilesize !== undefined) { $('#max_upload').val(response.data.uploadMaxFilesize); + $('#free_space').val(response.data.freeSpace); $('#upload.button').attr('original-title', response.data.maxHumanFilesize); $('#usedSpacePercent').val(response.data.usedSpacePercent); Files.displayStorageWarnings(); 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']); } |