Change free space calculation
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
8dd249937f
commit
2513b64602
|
@ -708,11 +708,13 @@ class Trashbin {
|
|||
*/
|
||||
private static function calculateFreeSpace($trashbinSize, $user) {
|
||||
$config = \OC::$server->getConfig();
|
||||
$systemTrashbinSize = (int)$config->getAppValue('files_trashbin', 'trashbin_size', '-1');
|
||||
$userTrashbinSize = (int)$config->getUserValue($user, 'files_trashbin', 'trashbin_size', '-1');
|
||||
$configuredTrashbinSize = ($userTrashbinSize < 0) ? $systemTrashbinSize : $userTrashbinSize;
|
||||
if ($configuredTrashbinSize) {
|
||||
return $configuredTrashbinSize - $trashbinSize;
|
||||
if ($userTrashbinSize > -1) {
|
||||
return $userTrashbinSize - $trashbinSize;
|
||||
}
|
||||
$systemTrashbinSize = (int)$config->getAppValue('files_trashbin', 'trashbin_size', '-1');
|
||||
if ($systemTrashbinSize > -1) {
|
||||
return $systemTrashbinSize - $trashbinSize;
|
||||
}
|
||||
|
||||
$softQuota = true;
|
||||
|
|
Loading…
Reference in New Issue