Code

Updated componentGeneric
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 13:27:54 +0000 (13:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 13:27:54 +0000 (13:27 +0000)
-Move move() operation into tab object

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

gosa-plugins/systems/admin/systems/class_componentGeneric.inc
gosa-plugins/systems/admin/systems/tabs_component.inc

index bfec11c8204bf49ab6b7541a582082d49d96ddf8..15aeaef4d9f14aa422bd5edf4870e41e7c41f9c9 100644 (file)
@@ -274,10 +274,6 @@ class componentGeneric extends plugin
       $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
       
     } else {
-      if ($this->orig_dn != $this->dn){
-        $this->move($this->orig_dn, $this->dn);
-      }
-
       $ldap->cd($this->dn);
       $this->cleanup();
       $ldap->modify ($this->attrs); 
index c883831827dcb36e66e1a6e65e629d9dc3ef7ae9..22638c12f7e5d39a280b426f04f3fb0b4cdb30aa 100644 (file)
@@ -46,6 +46,14 @@ class componenttabs extends tabs
        'dn' to all plugins */
     $baseobject= $this->by_object['componentGeneric'];
     $this->dn= "cn=$baseobject->cn,".get_ou('componentou').$baseobject->base;
+
+    if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
+
+      /* Udpate acls */
+      $baseobject->update_acls($baseobject->orig_dn,$this->dn);
+      $baseobject->move($baseobject->orig_dn,$this->dn);
+    }
+
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){