$this->createDBUser($connection);
}
- \OC_Config::setValues([
+ $systemConfig = \OC::$server->getSystemConfig();
+ $systemConfig->setValues([
'dbuser' => $this->dbUser,
'dbpassword' => $this->dbPassword,
]);
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);
}
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")) {