Merge pull request #20923 from owncloud/OC_Config-in-setup

Replace OC_Config in setup
This commit is contained in:
Thomas Müller 2015-12-03 15:24:58 +01:00
commit ec366f625e
2 changed files with 5 additions and 4 deletions

View File

@ -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 {
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);

View File

@ -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")) {