summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-17 09:33:26 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-17 09:33:26 +0100
commit48a7f126fd05f6642b883e55f24617e8cbfd917e (patch)
treef5cefa1db408ee15d27a343080b355becc3732b0
parentb5c56a73229479e2df7714d91051f80b8a1066b5 (diff)
parent07e7d4836e747f7199170f21455d20143bbcb0b0 (diff)
downloadnextcloud-server-48a7f126fd05f6642b883e55f24617e8cbfd917e.tar.gz
nextcloud-server-48a7f126fd05f6642b883e55f24617e8cbfd917e.zip
Merge pull request #23326 from owncloud/manishbisht-combined-database-errors
[CI] Installation: Combined database errors
-rw-r--r--lib/private/setup/abstractdatabase.php7
-rw-r--r--lib/private/setup/oci.php7
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/setup/abstractdatabase.php b/lib/private/setup/abstractdatabase.php
index 0c1e5904e08..90203b67c1d 100644
--- a/lib/private/setup/abstractdatabase.php
+++ b/lib/private/setup/abstractdatabase.php
@@ -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) {
diff --git a/lib/private/setup/oci.php b/lib/private/setup/oci.php
index 3d5aca96c1f..a398876ad16 100644
--- a/lib/private/setup/oci.php
+++ b/lib/private/setup/oci.php
@@ -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;