need to replace - and . with _ in database-name

This commit is contained in:
Ralf Becker 2014-04-16 20:14:19 +00:00
parent c4f56f2c3b
commit f303930f6d

View File

@ -179,7 +179,7 @@ class setup_cmd_database extends setup_cmd
{
$this->set_defaults['db_name'] = $this->db_name =
$this->set_defaults['db_user'] = $this->db_user = // change user too (otherwise existing user/db could not connect any more!)
substr($this->db_name,0,self::MAX_DB_NAME_LEN);
substr(str_replace(array('.', '-'), '_', $this->db_name),0,self::MAX_DB_NAME_LEN);
}
try {
$msg = $this->connect();