summaryrefslogtreecommitdiffstats
path: root/lib/private/setup/abstractdatabase.php
diff options
context:
space:
mode:
authorManish Bisht <manish.bisht490@gmail.com>2016-03-14 21:30:59 +0530
committerMorris Jobke <hey@morrisjobke.de>2016-03-16 19:21:14 +0100
commit07e7d4836e747f7199170f21455d20143bbcb0b0 (patch)
tree63e75491de228cc20bec7db566b1c65b4d18170a /lib/private/setup/abstractdatabase.php
parentb4ea527fb2504a259e59c97b1f5cf77b47dafbe9 (diff)
downloadnextcloud-server-07e7d4836e747f7199170f21455d20143bbcb0b0.tar.gz
nextcloud-server-07e7d4836e747f7199170f21455d20143bbcb0b0.zip
Update oci.php
Error Fixed combined the database errors Merged Database Errors
Diffstat (limited to 'lib/private/setup/abstractdatabase.php')
-rw-r--r--lib/private/setup/abstractdatabase.php7
1 files changed, 4 insertions, 3 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) {