Use $storageInfo['free']

remotes/origin/ldap_group_count
Pellaeon Lin 11 years ago
parent 19675c2c9d
commit 929c930b0a
  1. 2
      apps/files/index.php
  2. 3
      apps/files/lib/helper.php

@ -103,7 +103,7 @@ if ($needUpgrade) {
} else {
// information about storage capacities
$storageInfo=OC_Helper::getStorageInfo($dir);
$freeSpace=OCP\Util::freeSpace($dir);
$freeSpace=$storageInfo['free'];
$uploadLimit=OCP\Util::uploadLimit();
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');

@ -6,7 +6,6 @@ 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;
@ -16,7 +15,7 @@ class Helper
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,
'freeSpace' => $freeSpace,
'freeSpace' => $storageInfo['free'],
'usedSpacePercent' => (int)$storageInfo['relative']);
}

Loading…
Cancel
Save