diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index 9aa9e6d526..6e6b6aebb6 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -161,7 +161,7 @@ class Storage { * store a new version of a file. */ public static function store($filename) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + if(\OC::$server->getConfig()->getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { // if the file gets streamed we need to remove the .part extension // to get the right target @@ -320,7 +320,7 @@ class Storage { */ public static function rollback($file, $revision) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + if(\OC::$server->getConfig()->getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { // add expected leading slash $file = '/' . ltrim($file, '/'); list($uid, $filename) = self::getUidAndFilename($file); diff --git a/apps/user_ldap/appinfo/install.php b/apps/user_ldap/appinfo/install.php index 43ec69a950..09f9b41234 100644 --- a/apps/user_ldap/appinfo/install.php +++ b/apps/user_ldap/appinfo/install.php @@ -21,10 +21,11 @@ * along with this program. If not, see * */ -$state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'doSet'); +$config = \OC::$server->getConfig(); +$state = $config->getSystemValue('ldapIgnoreNamingRules', 'doSet'); if($state === 'doSet') { OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); } -$helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig()); +$helper = new \OCA\User_LDAP\Helper($config); $helper->setLDAPProvider(); diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index 851ff03cbb..c65e6e34e2 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -349,7 +349,7 @@ class Configuration { */ protected function getSystemValue($varName) { //FIXME: if another system value is added, softcode the default value - return \OCP\Config::getSystemValue($varName, false); + return \OC::$server->getConfig()->getSystemValue($varName, false); } /** diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 229c6fc7d6..a81c34c31f 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -88,7 +88,7 @@ class Scanner extends BasicEmitter implements IScanner { $this->storage = $storage; $this->storageId = $this->storage->getId(); $this->cache = $storage->getCache(); - $this->cacheActive = !Config::getSystemValue('filesystem_cache_readonly', false); + $this->cacheActive = !\OC::$server->getConfig()->getSystemValue('filesystem_cache_readonly', false); $this->lockingProvider = \OC::$server->getLockingProvider(); } diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php index a05ffef9e9..322b254e38 100644 --- a/lib/private/Preview/Office.php +++ b/lib/private/Preview/Office.php @@ -42,7 +42,7 @@ abstract class Office extends Provider { $tmpDir = \OC::$server->getTempManager()->getTempBaseDir(); $defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir . '/owncloud-' . \OC_Util::getInstanceId() . '/') . ' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir '; - $clParameters = \OCP\Config::getSystemValue('preview_office_cl_parameters', $defaultParameters); + $clParameters = \OC::$server->getConfig()->getSystemValue('preview_office_cl_parameters', $defaultParameters); $exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath); diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index 18ba44ac20..8fc880667e 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -1081,7 +1081,8 @@ class OC_Util { $location = $urlGenerator->getAbsoluteURL($defaultPage); } else { $appId = 'files'; - $defaultApps = explode(',', \OCP\Config::getSystemValue('defaultapp', 'files')); + $config = \OC::$server->getConfig(); + $defaultApps = explode(',', $config->getSystemValue('defaultapp', 'files')); // find the first app that is enabled for the current user foreach ($defaultApps as $defaultApp) { $defaultApp = OC_App::cleanAppId(strip_tags($defaultApp)); @@ -1091,7 +1092,7 @@ class OC_Util { } } - if(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') { + if($config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') { $location = $urlGenerator->getAbsoluteURL('/apps/' . $appId . '/'); } else { $location = $urlGenerator->getAbsoluteURL('/index.php/apps/' . $appId . '/'); diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index 39a29742e4..52d1857164 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -305,7 +305,7 @@ class UtilTest extends \Test\TestCase { * @group DB */ function testDefaultApps($defaultAppConfig, $expectedPath, $enabledApps) { - $oldDefaultApps = \OCP\Config::getSystemValue('defaultapp', ''); + $oldDefaultApps = \OC::$server->getConfig()->getSystemValue('defaultapp', ''); // CLI is doing messy stuff with the webroot, so need to work it around $oldWebRoot = \OC::$WEBROOT; \OC::$WEBROOT = '';