mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
- setting set_defaults also with values containing (now replaced) replacements like $domain
- shorten db-name/-user to self::MAX_DB_NAME_LEN chars
This commit is contained in:
parent
316ac13e31
commit
6c885b31fb
@ -387,7 +387,7 @@ class setup_cmd_config extends setup_cmd
|
||||
}
|
||||
if (strpos($this->$name,'$') !== false)
|
||||
{
|
||||
$this->$name = str_replace(array(
|
||||
$this->set_defaults[$name] = $this->$name = str_replace(array(
|
||||
'$domain',
|
||||
),array(
|
||||
$this->domain,
|
||||
|
@ -174,6 +174,13 @@ class setup_cmd_database extends setup_cmd
|
||||
{
|
||||
static $try_make_unique = 0; // to limit trials to create a unique name
|
||||
|
||||
// shorten db-name/-user to self::MAX_DB_NAME_LEN chars
|
||||
if ($this->make_db_name_unique && strlen($this->db_name) > self::MAX_DB_NAME_LEN)
|
||||
{
|
||||
$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);
|
||||
}
|
||||
try {
|
||||
$msg = $this->connect();
|
||||
}
|
||||
@ -206,7 +213,7 @@ class setup_cmd_database extends setup_cmd
|
||||
$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-strlen($num)).$num;
|
||||
|
||||
return $this->create();
|
||||
return $this->create();
|
||||
}
|
||||
catch (egw_exception_wrong_userinput $e2)
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ class setup_cmd_ldap extends setup_cmd
|
||||
}
|
||||
if (strpos($this->$name,'$') !== false)
|
||||
{
|
||||
$this->$name = str_replace(array(
|
||||
$this->set_defaults[$name] = $this->$name = str_replace(array(
|
||||
'$domain',
|
||||
'$suffix',
|
||||
'$base',
|
||||
|
Loading…
Reference in New Issue
Block a user