]> source.dussan.org Git - nextcloud-server.git/commitdiff
allow empty hostname and dots in service name for oracle autosetup
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 28 Aug 2014 13:54:28 +0000 (15:54 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 29 Aug 2014 15:11:38 +0000 (17:11 +0200)
lib/private/setup/oci.php

index 24863b9e38a23238fc99bccd614010953854512e..23b5232438a228431d41e8241154ff61a4550a3a 100644 (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);