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