Merge pull request #2070 from owncloud/fix_quota
fix quota calculation for trash and versions
This commit is contained in:
commit
05aad21b99
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue