Code

Enabled move
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 16 May 2008 14:19:52 +0000 (14:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 16 May 2008 14:19:52 +0000 (14:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10937 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_plugin.inc
gosa-core/plugins/admin/departments/tabs_department.inc

index 3b05e2563a8b5a4f5709aec087c38785641e9c78..440c1e801ed57174bcfc61f857b77cb95bf0d5e8 100644 (file)
@@ -900,6 +900,7 @@ class plugin
     $ldap = $this->config->get_ldap_link();
     if (!$ldap->rename_dn($src_dn,$dst_dn)){
       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $src_dn, "", get_class()));
+      return(FALSE);
     }
 
     /* Get list of groups within this tree,
@@ -984,8 +985,7 @@ class plugin
       $ui->reset_acl_cache();
     }
 
-    echo sprintf("# %s  --- %.6f<br>",__LINE__,(microtime(1) - $start));
-    return(1); 
+    return(TRUE); 
   }
 
 
@@ -1003,7 +1003,7 @@ class plugin
         Currently still deactivated. !!
     
      */
-    if(FALSE){
+    if(TRUE){
       return($this->rename($src_dn, $dst_dn));
     }
 
index 4f29396fc667200f41fc85716481a4df794e2224..7e9b45c3ac4d7ea87643c2959358fcae868b0aa8 100644 (file)
@@ -46,6 +46,7 @@ class deptabs extends tabs
    */
   function am_i_moved()
   {
+    return(FALSE);
     if($this->moved) return(FALSE);
     $baseobject= &$this->by_object['department'];
     $ou       = preg_replace('/,/', '\,', $baseobject->ou);  
@@ -90,6 +91,12 @@ class deptabs extends tabs
     $baseobject= &$this->by_object['department'];
     $ou       = preg_replace('/,/', '\,', $baseobject->ou);  
     $new_dn   = @LDAP::convert('ou='.$ou.','.$baseobject->base);
+
+    /* Move group? */
+    if ($this->dn != $new_dn && $this->dn != "new"){
+        $baseobject->move($this->dn,$new_dn);
+    } 
+
     $this->dn= $new_dn;
     $baseobject->dn= $this->dn;
     if (!$ignore_account){