diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-19 00:31:09 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-19 00:31:09 +0100 |
commit | cdd07b33392897b1b6c7f5707b83874ba06ec363 (patch) | |
tree | 1bad04263312d7e799bb8eeb8c59afe90f2733fb /apps/files/ajax/getstoragestats.php | |
parent | afb5de955e00490be5762247e817b20722091f37 (diff) | |
download | nextcloud-server-cdd07b33392897b1b6c7f5707b83874ba06ec363.tar.gz nextcloud-server-cdd07b33392897b1b6c7f5707b83874ba06ec363.zip |
introducing class OCA/files/lib/Helper with new function to build an array with storage stats
DRYing the code by using \OCA\files\lib\Helper::buildFileStorageStatistics()
now returning used space percent on each ajax call
Diffstat (limited to 'apps/files/ajax/getstoragestats.php')
-rw-r--r-- | apps/files/ajax/getstoragestats.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php index e55e346ed67..7a2b642a9bd 100644 --- a/apps/files/ajax/getstoragestats.php +++ b/apps/files/ajax/getstoragestats.php @@ -5,12 +5,5 @@ $RUNTIME_APPTYPES = array('filesystem'); OCP\JSON::checkLoggedIn(); -$l=new OC_L10N('files'); -$maxUploadFilesize = OCP\Util::maxUploadFilesize($dir); -$maxHumanFilesize = OCP\Util::humanFileSize($maxUploadFilesize); -$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize; - // send back json -OCP\JSON::success(array('data' => array('uploadMaxFilesize' => $maxUploadFilesize, - 'maxHumanFilesize' => $maxHumanFilesize -))); +OCP\JSON::success(array('data' => \OCA\files\lib\Helper::buildFileStorageStatistics('/'))); |