summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Trashbin.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/lib/Trashbin.php')
-rw-r--r--apps/files_trashbin/lib/Trashbin.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index 1e22349f2bb..6e7ef18b139 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -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;