Skip to content
Snippets Groups Projects
Commit aa0265bd authored by Morris Jobke's avatar Morris Jobke
Browse files

Replace OC_Config in setup

parent 2d1cc8aa
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,8 @@ class PostgreSQL extends AbstractDatabase { ...@@ -66,7 +66,8 @@ class PostgreSQL extends AbstractDatabase {
$this->createDBUser($connection); $this->createDBUser($connection);
} }
\OC_Config::setValues([ $systemConfig = \OC::$server->getSystemConfig();
$systemConfig->setValues([
'dbuser' => $this->dbUser, 'dbuser' => $this->dbUser,
'dbpassword' => $this->dbPassword, 'dbpassword' => $this->dbPassword,
]); ]);
...@@ -78,8 +79,8 @@ class PostgreSQL extends AbstractDatabase { ...@@ -78,8 +79,8 @@ class PostgreSQL extends AbstractDatabase {
pg_close($connection); pg_close($connection);
// connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled // connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled
$this->dbUser = \OC_Config::getValue('dbuser'); $this->dbUser = $systemConfig->getValue('dbuser');
$this->dbPassword = \OC_Config::getValue('dbpassword'); $this->dbPassword = $systemConfig->getValue('dbpassword');
$e_host = addslashes($this->dbHost); $e_host = addslashes($this->dbHost);
$e_dbname = addslashes($this->dbName); $e_dbname = addslashes($this->dbName);
......
...@@ -31,7 +31,7 @@ class Sqlite extends AbstractDatabase { ...@@ -31,7 +31,7 @@ class Sqlite extends AbstractDatabase {
} }
public function setupDatabase($username) { 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 //delete the old sqlite database first, might cause infinte loops otherwise
if(file_exists("$datadir/owncloud.db")) { if(file_exists("$datadir/owncloud.db")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment