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) {
|
public function validate($config) {
|
||||||
$errors = array();
|
$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));
|
$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
|
||||||
}
|
} else if(empty($config['dbname'])) {
|
||||||
if(empty($config['dbname'])) {
|
|
||||||
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
|
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
|
||||||
}
|
}
|
||||||
if(substr_count($config['dbname'], '.') >= 1) {
|
if(substr_count($config['dbname'], '.') >= 1) {
|
||||||
|
|
|
@ -50,10 +50,11 @@ class OCI extends AbstractDatabase {
|
||||||
|
|
||||||
public function validate($config) {
|
public function validate($config) {
|
||||||
$errors = array();
|
$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));
|
$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
|
||||||
}
|
} else if(empty($config['dbname'])) {
|
||||||
if(empty($config['dbname'])) {
|
|
||||||
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
|
$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
|
||||||
}
|
}
|
||||||
return $errors;
|
return $errors;
|
||||||
|
|
Loading…
Reference in New Issue