fixed suffix creation

This commit is contained in:
Roland Gruber 2004-01-07 17:45:28 +00:00
parent 12d39f7dc1
commit 3fdfc8857b
3 changed files with 15 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;