summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-04 16:48:07 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-08 22:42:37 +0100
commit0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d (patch)
tree68ee815c2f06e4f6ef049d56f65fdbf2cf8c4d18 /apps/files_trashbin
parent2d5fc9c1a6beec15f04277ccf1408b17f04631e9 (diff)
downloadnextcloud-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.php6
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('/');