diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-02-13 16:28:49 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-02-13 16:28:49 +0100 |
commit | 181bbd4325ea2b21ff8ecca93eb5ac839d6a739d (patch) | |
tree | 18fdd4bfdbd2de538ebe996e7ddb580a07450994 /lib/private | |
parent | 4b84e3a7e8bf7dc0a8e62074803f97a81571ca22 (diff) | |
download | nextcloud-server-181bbd4325ea2b21ff8ecca93eb5ac839d6a739d.tar.gz nextcloud-server-181bbd4325ea2b21ff8ecca93eb5ac839d6a739d.zip |
Remove usage of legacy OC_Appconfig
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/cache/fileglobal.php | 5 | ||||
-rw-r--r-- | lib/private/setup.php | 9 | ||||
-rwxr-xr-x | lib/private/util.php | 5 |
3 files changed, 11 insertions, 8 deletions
diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php index bd049bba4d0..95b7ceb099f 100644 --- a/lib/private/cache/fileglobal.php +++ b/lib/private/cache/fileglobal.php @@ -81,13 +81,14 @@ class FileGlobal { } static public function gc() { - $last_run = \OC_AppConfig::getValue('core', 'global_cache_gc_lastrun', 0); + $appConfig = \OC::$server->getAppConfig(); + $last_run = $appConfig->getValue('core', 'global_cache_gc_lastrun', 0); $now = time(); if (($now - $last_run) < 300) { // only do cleanup every 5 minutes return; } - \OC_AppConfig::setValue('core', 'global_cache_gc_lastrun', $now); + $appConfig->setValue('core', 'global_cache_gc_lastrun', $now); $cache_dir = self::getCacheDir(); if($cache_dir and is_dir($cache_dir)) { $dh=opendir($cache_dir); diff --git a/lib/private/setup.php b/lib/private/setup.php index 5232398d1d7..17ef75bc7b5 100644 --- a/lib/private/setup.php +++ b/lib/private/setup.php @@ -94,10 +94,11 @@ class OC_Setup { } if(count($error) == 0) { - OC_Appconfig::setValue('core', 'installedat', microtime(true)); - OC_Appconfig::setValue('core', 'lastupdatedat', microtime(true)); - OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php'); - OC_AppConfig::setValue('core', 'remote_core.js', '/core/minimizer.php'); + $appConfig = \OC::$server->getAppConfig(); + $appConfig->setValue('core', 'installedat', microtime(true)); + $appConfig->setValue('core', 'lastupdatedat', microtime(true)); + $appConfig->setValue('core', 'remote_core.css', '/core/minimizer.php'); + $appConfig->setValue('core', 'remote_core.js', '/core/minimizer.php'); OC_Group::createGroup('admin'); OC_Group::addToGroup($username, 'admin'); diff --git a/lib/private/util.php b/lib/private/util.php index 0585749d615..246c82a26c7 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -91,9 +91,10 @@ class OC_Util { } public static function getUserQuota($user){ - $userQuota = OC_Preferences::getValue($user, 'files', 'quota', 'default'); + $config = \OC::$server->getConfig(); + $userQuota = $config->getUserValue($user, 'files', 'quota', 'default'); if($userQuota === 'default') { - $userQuota = OC_AppConfig::getValue('files', 'default_quota', 'none'); + $userQuota = $config->getAppValue('files', 'default_quota', 'none'); } if($userQuota === 'none') { return \OC\Files\SPACE_UNLIMITED; |