Code

Updated ldap->rename().
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 30 Jun 2008 09:42:02 +0000 (09:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 30 Jun 2008 09:42:02 +0000 (09:42 +0000)
-Added create missing trees, to prevent error messages when cut and paste objects.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11475 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_plugin.inc

index 74b530e0a726e821d5b6c0415cf2ef26d0db648b..e2d6bd6c28f17bc30be93216f1ea33b9834178c0 100644 (file)
@@ -898,6 +898,9 @@ class plugin
 
     /* Try to move the source entry to the destination position */
     $ldap = $this->config->get_ldap_link();
+    $ldap->cd($this->config->current['BASE']);
+    $ldap->create_missing_trees(preg_replace("/^[^,]+,/","",$dst_dn));
+
     if (!$ldap->rename_dn($src_dn,$dst_dn)){
       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $src_dn, "", get_class()));
       return(FALSE);