summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
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_versions
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_versions')
-rw-r--r--apps/files_versions/lib/storage.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php
index 82e0ecc3e2f..3d30ada863a 100644
--- a/apps/files_versions/lib/storage.php
+++ b/apps/files_versions/lib/storage.php
@@ -479,15 +479,16 @@ class Storage {
* Erase a file's versions which exceed the set quota
*/
private static function expire($filename, $versionsSize = null, $offset = 0) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
+ $config = \OC::$server->getConfig();
+ if($config->getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
$versionsFileview = new \OC\Files\View('/'.$uid.'/files_versions');
// get available disk space for user
$softQuota = true;
- $quota = \OC_Preferences::getValue($uid, 'files', 'quota');
+ $quota = $config->getUserValue($uid, 'files', 'quota', null);
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('/');