mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +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)
|
if (strpos($this->$name,'$') !== false)
|
||||||
{
|
{
|
||||||
$this->$name = str_replace(array(
|
$this->set_defaults[$name] = $this->$name = str_replace(array(
|
||||||
'$domain',
|
'$domain',
|
||||||
),array(
|
),array(
|
||||||
$this->domain,
|
$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
|
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 {
|
try {
|
||||||
$msg = $this->connect();
|
$msg = $this->connect();
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ class setup_cmd_ldap extends setup_cmd
|
|||||||
}
|
}
|
||||||
if (strpos($this->$name,'$') !== false)
|
if (strpos($this->$name,'$') !== false)
|
||||||
{
|
{
|
||||||
$this->$name = str_replace(array(
|
$this->set_defaults[$name] = $this->$name = str_replace(array(
|
||||||
'$domain',
|
'$domain',
|
||||||
'$suffix',
|
'$suffix',
|
||||||
'$base',
|
'$base',
|
||||||
|
Loading…
Reference in New Issue
Block a user