Skip to content
Snippets Groups Projects
Commit 929c930b authored by Pellaeon Lin's avatar Pellaeon Lin
Browse files

Use $storageInfo['free']

parent 19675c2c
Branches
No related tags found
No related merge requests found
......@@ -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']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment