]> source.dussan.org Git - nextcloud-server.git/commitdiff
Replace OC_Config in setup
authorMorris Jobke <hey@morrisjobke.de>
Thu, 3 Dec 2015 13:35:15 +0000 (14:35 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 3 Dec 2015 13:35:15 +0000 (14:35 +0100)
lib/private/setup/postgresql.php
lib/private/setup/sqlite.php

index 0a559e7a58992794073102eea8424683526ab603..59762209d086766dc7f69f04ba0885c6ecfc6f20 100644 (file)
@@ -66,7 +66,8 @@ class PostgreSQL extends AbstractDatabase {
                        $this->createDBUser($connection);
                }
 
-               \OC_Config::setValues([
+               $systemConfig = \OC::$server->getSystemConfig();
+               $systemConfig->setValues([
                        'dbuser'                => $this->dbUser,
                        'dbpassword'    => $this->dbPassword,
                ]);
@@ -78,8 +79,8 @@ class PostgreSQL extends AbstractDatabase {
                pg_close($connection);
 
                // connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled
-               $this->dbUser = \OC_Config::getValue('dbuser');
-               $this->dbPassword = \OC_Config::getValue('dbpassword');
+               $this->dbUser = $systemConfig->getValue('dbuser');
+               $this->dbPassword = $systemConfig->getValue('dbpassword');
 
                $e_host = addslashes($this->dbHost);
                $e_dbname = addslashes($this->dbName);
index 820a89d4cff6f6a7157fbcfbf216135e95450fe9..ce6005620eb57f11118a838ba6260ef03593f4a8 100644 (file)
@@ -31,7 +31,7 @@ class Sqlite extends AbstractDatabase {
        }
 
        public function setupDatabase($username) {
-               $datadir = \OC_Config::getValue('datadirectory');
+               $datadir = \OC::$server->getSystemConfig()->getValue('datadirectory');
 
                //delete the old sqlite database first, might cause infinte loops otherwise
                if(file_exists("$datadir/owncloud.db")) {