fix quota calculation for trash and versions
This commit is contained in:
parent
36a1bcb732
commit
94dab96dba
2 changed files with 5 additions and 5 deletions
|
@ -108,7 +108,7 @@ class Trashbin {
|
|||
if ( $quota === null || $quota === 'default') {
|
||||
$quota = \OC_Appconfig::getValue('files', 'default_quota');
|
||||
}
|
||||
if ( $quota === null ) {
|
||||
if ( $quota === null || $quote === '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 || $quote === 'none' ) {
|
||||
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
|
||||
} else {
|
||||
$quota = \OCP\Util::computerFileSize($quota);
|
||||
|
|
Loading…
Reference in a new issue