summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-02 21:54:42 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-02 21:54:42 +0100
commit09600058d0bb199a84068c5b6216c3b48b92740e (patch)
treef9912892bbf57f0a06070807d9949c60efde931e /lib
parentdf5872ec50a68de5d99bd6b5cf17ceb94f2ef833 (diff)
parent37ecde065b8826098543dc4544732239c7a4cabf (diff)
downloadnextcloud-server-09600058d0bb199a84068c5b6216c3b48b92740e.tar.gz
nextcloud-server-09600058d0bb199a84068c5b6216c3b48b92740e.zip
Merge pull request #20901 from owncloud/get-rid-of-more-legacy-config-stuff
Replace old config code with usage of proper APIs
Diffstat (limited to 'lib')
-rw-r--r--lib/private/installer.php13
-rw-r--r--lib/private/setup.php6
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 021e496392f..fa9fc6704df 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -538,17 +538,20 @@ class OC_Installer{
if (is_null($info)) {
return false;
}
- \OC::$server->getAppConfig()->setValue($app, 'installed_version', OC_App::getAppVersion($app));
+
+ $config = \OC::$server->getConfig();
+
+ $config->setAppValue($app, 'installed_version', OC_App::getAppVersion($app));
if (array_key_exists('ocsid', $info)) {
- \OC::$server->getAppConfig()->setValue($app, 'ocsid', $info['ocsid']);
+ $config->setAppValue($app, 'ocsid', $info['ocsid']);
}
//set remote/public handlers
foreach($info['remote'] as $name=>$path) {
- OCP\CONFIG::setAppValue('core', 'remote_'.$name, $app.'/'.$path);
+ $config->setAppValue('core', 'remote_'.$name, $app.'/'.$path);
}
foreach($info['public'] as $name=>$path) {
- OCP\CONFIG::setAppValue('core', 'public_'.$name, $app.'/'.$path);
+ $config->setAppValue('core', 'public_'.$name, $app.'/'.$path);
}
OC_App::setAppTypes($info['id']);
@@ -563,7 +566,7 @@ class OC_Installer{
*/
public static function checkCode($folder) {
// is the code checker enabled?
- if(!OC_Config::getValue('appcodechecker', false)) {
+ if(!\OC::$server->getConfig()->getSystemValue('appcodechecker', false)) {
return true;
}
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 2c959622cc7..814d78679e2 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -463,7 +463,9 @@ class Setup {
$content.= "</ifModule>\n\n";
$content.= "# section for Apache 2.2 and 2.4\n";
$content.= "IndexIgnore *\n";
- file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data').'/.htaccess', $content);
- file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data').'/index.html', '');
+
+ $baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
+ file_put_contents($baseDir . '/.htaccess', $content);
+ file_put_contents($baseDir . '/index.html', '');
}
}