From 3fdfc8857bec49f23aec328917eaa3a8903315d7 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 7 Jan 2004 17:45:28 +0000 Subject: [PATCH] fixed suffix creation --- lam-0.4/templates/confwiz/ldaptest.php | 6 +++++- lam-0.4/templates/initsuff.php | 6 +++++- lam/templates/initsuff.php | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lam-0.4/templates/confwiz/ldaptest.php b/lam-0.4/templates/confwiz/ldaptest.php index dc748746..55c6bc13 100644 --- a/lam-0.4/templates/confwiz/ldaptest.php +++ b/lam-0.4/templates/confwiz/ldaptest.php @@ -138,8 +138,12 @@ if (sizeof($new_suffs) > 0) { } else { // add root entry $attr = array(); - $attr['objectClass'] = 'organization'; + $attr['objectClass'][] = 'organization'; $attr[$headarray[0]] = $headarray[1]; + if ($headarray[0] == "dc") { + $attr['o'] = $headarray[1]; + $attr['objectClass'][] = 'dcObject'; + } $dn = $subsuffs[$k]; if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) { $fail[] = $suff; diff --git a/lam-0.4/templates/initsuff.php b/lam-0.4/templates/initsuff.php index 6096f36d..30890fe6 100644 --- a/lam-0.4/templates/initsuff.php +++ b/lam-0.4/templates/initsuff.php @@ -104,8 +104,12 @@ if ($_POST['add_suff'] || $_POST['cancel']) { } else { // add root entry $attr = array(); - $attr['objectClass'] = 'organization'; + $attr['objectClass'][] = 'organization'; $attr[$headarray[0]] = $headarray[1]; + if ($headarray[0] == "dc") { + $attr['o'] = $headarray[1]; + $attr['objectClass'][] = 'dcObject'; + } $dn = $subsuffs[$k]; if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) { $fail[] = $suff; diff --git a/lam/templates/initsuff.php b/lam/templates/initsuff.php index 6096f36d..30890fe6 100644 --- a/lam/templates/initsuff.php +++ b/lam/templates/initsuff.php @@ -104,8 +104,12 @@ if ($_POST['add_suff'] || $_POST['cancel']) { } else { // add root entry $attr = array(); - $attr['objectClass'] = 'organization'; + $attr['objectClass'][] = 'organization'; $attr[$headarray[0]] = $headarray[1]; + if ($headarray[0] == "dc") { + $attr['o'] = $headarray[1]; + $attr['objectClass'][] = 'dcObject'; + } $dn = $subsuffs[$k]; if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) { $fail[] = $suff;