$tmpl->printPage();
} else {
// information about storage capacities
- $storageInfo=OC_Helper::getStorageInfo();
+ $storageInfo=OC_Helper::getStorageInfo($dir);
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
if (OC_App::isEnabled('files_encryption')) {
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
// information about storage capacities
- $storageInfo = \OC_Helper::getStorageInfo();
+ $storageInfo = \OC_Helper::getStorageInfo($dir);
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,
}
/**
- * Calculate the disc space
+ * Calculate the disc space for the given path
+ *
+ * @param string $path
+ * @return array
*/
- public static function getStorageInfo($path = '/') {
+ public static function getStorageInfo($path) {
$rootInfo = \OC\Files\Filesystem::getFileInfo($path);
$used = $rootInfo['size'];
if ($used < 0) {
OC_Util::addStyle( '3rdparty', 'chosen' );
OC_App::setActiveNavigationEntry( 'personal' );
-$storageInfo=OC_Helper::getStorageInfo();
+$storageInfo=OC_Helper::getStorageInfo('/');
$email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', '');