summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ccb627)
raw | patch | inline | side by side (parent: 6ccb627)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Feb 2008 09:17:45 +0000 (09:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Feb 2008 09:17:45 +0000 (09:17 +0000) |
-Fixed duplicated recursion.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8900 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8900 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_plugin.inc | patch | blob | history |
index e33b2ec613feebaad84cdcd40bb6e3b1060ac42f..3527494d88e01990e729d981e3ed15fb021018b2 100644 (file)
return (FALSE);
}
- /* Perform a search for all objects to be moved */
- $objects= array();
- $ldap->cd($src_dn);
- $ldap->search("(objectClass=*)", array("dn"));
- while($attrs= $ldap->fetch()){
- $dn= $attrs['dn'];
- $objects[$dn]= strlen($dn);
- }
-
- /* Sort objects by indent level */
- asort($objects);
- reset($objects);
-
- /* Copy objects from small to big indent levels by replacing src_dn by dst_dn */
- foreach ($objects as $object => $len){
- $src= $object;
- $dst= preg_replace("/$src_dn$/", "$dst_dn", $object);
- if (!$this->copy($src, $dst)){
- return (FALSE);
- }
- }
+ $this->copy($src_dn, $dst_dn);
/* Remove src_dn */
$ldap->cd($src_dn);
- $ldap->recursive_remove();
+ $ldap->recursive_remove($src_dn);
return (TRUE);
}