From 16469e2208cfea829b615e51b9b84839af5eeceb Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 2 May 2007 08:43:36 +0000 Subject: [PATCH] Updated create_missing_trees to create the base, too git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6221 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 8c5698a44..5da63f534 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -644,13 +644,13 @@ class LDAP{ { global $config; - /* Ignore create_missing trees if the base equals target */ + $real_path= substr($target, 0, strlen($target) - strlen($this->basedn) -1 ); + if ($target == $this->basedn){ - return; + $l= array("dummy"); + } else { + $l= array_reverse(gosa_ldap_explode_dn($real_path)); } - - $real_path= substr($target, 0, strlen($target) - strlen($this->basedn) -1 ); - $l= array_reverse(gosa_ldap_explode_dn($real_path)); unset($l['count']); $cdn= $this->basedn; $tag= ""; @@ -659,7 +659,9 @@ class LDAP{ $classes= $this->get_objectclasses(); foreach ($l as $part){ - $cdn= "$part,$cdn"; + if ($party != "dummy"){ + $cdn= "$part,$cdn"; + } /* Ignore referrals */ $found= false; -- 2.30.2