Merge pull request #2070 from owncloud/fix_quota

fix quota calculation for trash and versions
This commit is contained in:
Björn Schießle 2013-03-04 03:33:47 -08:00
commit 05aad21b99
2 changed files with 5 additions and 5 deletions

View File

@ -108,7 +108,7 @@ class Trashbin {
if ( $quota === null || $quota === 'default') {
$quota = \OC_Appconfig::getValue('files', 'default_quota');
}
if ( $quota === null ) {
if ( $quota === null || $quota === 'none' ) {
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
} else {
$quota = \OCP\Util::computerFileSize($quota);

View File

@ -351,11 +351,11 @@ class Storage {
$versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
// get available disk space for user
$quota = \OC_Preferences::getValue($uid, 'files', 'quota');
if ( $quota === null ) {
$quota = \OC_Preferences::getValue($user, 'files', 'quota');
if ( $quota === null || $quota === 'default') {
$quota = \OC_Appconfig::getValue('files', 'default_quota');
}
if ( $quota === null ) {
if ( $quota === null || $quota === 'none' ) {
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
} else {
$quota = \OCP\Util::computerFileSize($quota);