summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-02-12 15:48:14 +0100
committericewind1991 <robin@icewind.nl>2014-02-12 15:48:14 +0100
commit7af456730eef4a1c947188c12d69a0caf0a5bd2b (patch)
tree48fd8ad0f58e14241f955c956f86fa9c83fce8ee /apps/files
parent3699728a3a02dd17ea617a7e8f781c09e837f360 (diff)
parent753af3a3ff17d9126a738f292b3922981bd5673d (diff)
downloadnextcloud-server-7af456730eef4a1c947188c12d69a0caf0a5bd2b.tar.gz
nextcloud-server-7af456730eef4a1c947188c12d69a0caf0a5bd2b.zip
Merge pull request #6964 from owncloud/storagestatistics-reuse
Reuse the calculated free_space in buildFileStorageStatistics
Diffstat (limited to 'apps/files')
-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'],