mirror of
https://github.com/nextcloud/server.git
synced 2026-04-29 01:50:33 -04:00
Use $storageInfo['free']
This commit is contained in:
parent
19675c2c9d
commit
929c930b0a
2 changed files with 2 additions and 3 deletions
|
|
@ -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…
Reference in a new issue