allow empty hostname and dots in service name for oracle autosetup

This commit is contained in:
Jörn Friedrich Dreyer 2014-08-28 15:54:28 +02:00 committed by Thomas Müller
parent 033b0361ed
commit 10382ef2f0
1 changed files with 14 additions and 0 deletions

View File

@ -14,9 +14,23 @@ class OCI extends AbstractDatabase {
} else {
$this->dbtablespace = 'USERS';
}
// allow empty hostname for oracle
$this->dbhost = $config['dbhost'];
\OC_Config::setValue('dbhost', $this->dbhost);
\OC_Config::setValue('dbtablespace', $this->dbtablespace);
}
public function validate($config) {
$errors = array();
if(empty($config['dbuser'])) {
$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
}
if(empty($config['dbname'])) {
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
}
return $errors;
}
public function setupDatabase($username) {
$e_host = addslashes($this->dbhost);
$e_dbname = addslashes($this->dbname);