Update oci.php
Error Fixed combined the database errors Merged Database Errors
This commit is contained in:
parent
b4ea527fb2
commit
07e7d4836e
|
@ -59,10 +59,11 @@ abstract class AbstractDatabase {
|
|||
|
||||
public function validate($config) {
|
||||
$errors = array();
|
||||
if(empty($config['dbuser'])) {
|
||||
if(empty($config['dbuser']) && empty($config['dbname'])) {
|
||||
$errors[] = $this->trans->t("%s enter the database username and name.", array($this->dbprettyname));
|
||||
} else if(empty($config['dbuser'])) {
|
||||
$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
|
||||
}
|
||||
if(empty($config['dbname'])) {
|
||||
} else if(empty($config['dbname'])) {
|
||||
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
|
||||
}
|
||||
if(substr_count($config['dbname'], '.') >= 1) {
|
||||
|
|
|
@ -50,10 +50,11 @@ class OCI extends AbstractDatabase {
|
|||
|
||||
public function validate($config) {
|
||||
$errors = array();
|
||||
if(empty($config['dbuser'])) {
|
||||
if(empty($config['dbuser']) && empty($config['dbname'])) {
|
||||
$errors[] = $this->trans->t("%s enter the database username and name.", array($this->dbprettyname));
|
||||
} else if(empty($config['dbuser'])) {
|
||||
$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
|
||||
}
|
||||
if(empty($config['dbname'])) {
|
||||
} else if(empty($config['dbname'])) {
|
||||
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
|
||||
}
|
||||
return $errors;
|
||||
|
|
Loading…
Reference in New Issue