diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-12-04 16:48:07 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-08 22:42:37 +0100 |
commit | 0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d (patch) | |
tree | 68ee815c2f06e4f6ef049d56f65fdbf2cf8c4d18 /apps/files_trashbin | |
parent | 2d5fc9c1a6beec15f04277ccf1408b17f04631e9 (diff) | |
download | nextcloud-server-0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d.tar.gz nextcloud-server-0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d.zip |
reduce OC_Preferences, OC_Config and \OCP\Config usage
* files_encryption
* files_versions
* files_trashbin
* tests
* status.php
* core
* server container
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 661fc271dfc..b9d7a4aa6cf 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -621,11 +621,13 @@ class Trashbin { * @return int available free space for trash bin */ private static function calculateFreeSpace($trashbinSize, $user) { + $config = \OC::$server->getConfig(); + $softQuota = true; - $quota = \OC_Preferences::getValue($user, 'files', 'quota'); + $quota = $config->getUserValue($user, 'files', 'quota', null); $view = new \OC\Files\View('/' . $user); if ($quota === null || $quota === 'default') { - $quota = \OC::$server->getAppConfig()->getValue('files', 'default_quota'); + $quota = $config->getAppValue('files', 'default_quota', null); } if ($quota === null || $quota === 'none') { $quota = \OC\Files\Filesystem::free_space('/'); |