fixed suffix creation
This commit is contained in:
parent
12d39f7dc1
commit
3fdfc8857b
|
@ -138,8 +138,12 @@ if (sizeof($new_suffs) > 0) {
|
||||||
}
|
}
|
||||||
else { // add root entry
|
else { // add root entry
|
||||||
$attr = array();
|
$attr = array();
|
||||||
$attr['objectClass'] = 'organization';
|
$attr['objectClass'][] = 'organization';
|
||||||
$attr[$headarray[0]] = $headarray[1];
|
$attr[$headarray[0]] = $headarray[1];
|
||||||
|
if ($headarray[0] == "dc") {
|
||||||
|
$attr['o'] = $headarray[1];
|
||||||
|
$attr['objectClass'][] = 'dcObject';
|
||||||
|
}
|
||||||
$dn = $subsuffs[$k];
|
$dn = $subsuffs[$k];
|
||||||
if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) {
|
if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) {
|
||||||
$fail[] = $suff;
|
$fail[] = $suff;
|
||||||
|
|
|
@ -104,8 +104,12 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
|
||||||
}
|
}
|
||||||
else { // add root entry
|
else { // add root entry
|
||||||
$attr = array();
|
$attr = array();
|
||||||
$attr['objectClass'] = 'organization';
|
$attr['objectClass'][] = 'organization';
|
||||||
$attr[$headarray[0]] = $headarray[1];
|
$attr[$headarray[0]] = $headarray[1];
|
||||||
|
if ($headarray[0] == "dc") {
|
||||||
|
$attr['o'] = $headarray[1];
|
||||||
|
$attr['objectClass'][] = 'dcObject';
|
||||||
|
}
|
||||||
$dn = $subsuffs[$k];
|
$dn = $subsuffs[$k];
|
||||||
if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) {
|
if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) {
|
||||||
$fail[] = $suff;
|
$fail[] = $suff;
|
||||||
|
|
|
@ -104,8 +104,12 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
|
||||||
}
|
}
|
||||||
else { // add root entry
|
else { // add root entry
|
||||||
$attr = array();
|
$attr = array();
|
||||||
$attr['objectClass'] = 'organization';
|
$attr['objectClass'][] = 'organization';
|
||||||
$attr[$headarray[0]] = $headarray[1];
|
$attr[$headarray[0]] = $headarray[1];
|
||||||
|
if ($headarray[0] == "dc") {
|
||||||
|
$attr['o'] = $headarray[1];
|
||||||
|
$attr['objectClass'][] = 'dcObject';
|
||||||
|
}
|
||||||
$dn = $subsuffs[$k];
|
$dn = $subsuffs[$k];
|
||||||
if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) {
|
if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) {
|
||||||
$fail[] = $suff;
|
$fail[] = $suff;
|
||||||
|
|
Loading…
Reference in New Issue