Don't set Base User and Base Group when Base DN was detected, would case problems but does not provide any benefit. also make sure that empty string is saved instead of false for multiline values

remotes/origin/stable6
Arthur Schiwon 2013-10-17 20:58:43 +07:00
parent 183dd813d3
commit 17010e8f58
2 changed files with 3 additions and 5 deletions

@ -243,6 +243,9 @@ class Configuration {
$value = '';
} else {
$value = preg_split('/\r\n|\r|\n/', $value);
if($value === false) {
$value = '';
}
}
$this->setValue($varname, $value);

@ -424,11 +424,8 @@ class Wizard extends LDAPUtility {
$i = stripos($this->configuration->ldapAgentName, 'dc=');
if($i !== false) {
$base = substr($this->configuration->ldapAgentName, $i);
if($this->testBaseDN($base)) {
$this->applyFind('ldap_base', $base);
$this->applyFind('ldap_base_users', $base);
$this->applyFind('ldap_base_groups', $base);
return $this->result;
}
}
@ -445,8 +442,6 @@ class Wizard extends LDAPUtility {
$base2 = implode('dc=', $dparts);
if($base !== $base2 && $this->testBaseDN($base2)) {
$this->applyFind('ldap_base', $base2);
$this->applyFind('ldap_base_users', $base2);
$this->applyFind('ldap_base_groups', $base2);
return $this->result;
}