aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authortomneedham <tom@owncloud.com>2014-02-17 11:03:57 +0000
committertomneedham <tom@owncloud.com>2014-02-17 11:03:57 +0000
commita4b6d667038be9ca82c51fd0e22e7f3e51cb1e17 (patch)
tree1b456e75e10dde0f5a65af47420daa0abfd0fdf5 /apps/files/lib
parent049e03c2b92e10ef94d1f7bc900e74f078a56a9b (diff)
parent5a8d37023a84d933eaa5113400014805048a689b (diff)
downloadnextcloud-server-a4b6d667038be9ca82c51fd0e22e7f3e51cb1e17.tar.gz
nextcloud-server-a4b6d667038be9ca82c51fd0e22e7f3e51cb1e17.zip
Merge branch 'master' into migration_unit_tests
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/helper.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index 21d1f50e587..01fc65d76b7 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -5,14 +5,14 @@ namespace OCA\Files;
class Helper
{
public static function buildFileStorageStatistics($dir) {
+ // information about storage capacities
+ $storageInfo = \OC_Helper::getStorageInfo($dir);
+
$l = new \OC_L10N('files');
- $maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir);
+ $maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']);
$maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
- // information about storage capacities
- $storageInfo = \OC_Helper::getStorageInfo($dir);
-
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,
'freeSpace' => $storageInfo['free'],