Code

Updated system Management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Feb 2008 12:51:43 +0000 (12:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Feb 2008 12:51:43 +0000 (12:51 +0000)
-Remove New Devices correctly.

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

gosa-plugins/systems/admin/systems/class_systemManagement.inc

index 536444af58af0943c50de5a468bc50f1416a9a87..916730435d30e00ebf0b3b507561e9e04ed24a4e 100644 (file)
@@ -633,7 +633,11 @@ class systems extends plugin
           if(preg_match("/d/",$tabacl)){ 
 
             /* Delete request is permitted, perform LDAP action */
-            if($tabtype=="phonetabs"){
+            if(in_array($type,array("ArpNewDevice","NewDevice")) && class_available("termgeneric")){
+              $this->systab= new termgeneric($this->config, $dn);
+              $this->systab->set_acl_base($dn);
+              $this->systab->remove_from_parent();
+            }elseif($tabtype=="phonetabs"){
               $this->systab= new $tabtype($this->config, $this->config->data['TABS'][$tabobj], $dn,$type);
               $this->systab->set_acl_base($dn);
               $this->systab->by_object['phoneGeneric']->remove_from_parent ();
@@ -770,7 +774,11 @@ class systems extends plugin
       if(preg_match("/d/",$tabacl)){
 
         /* Delete request is permitted, perform LDAP action */
-        if($tabtype=="phonetabs"){
+        if(in_array($type,array("ArpNewDevice","NewDevice")) && class_available("termgeneric")){
+          $this->systab= new termgeneric($this->config, $this->dn);
+          $this->systab->set_acl_base($this->dn);
+          $this->systab->remove_from_parent();
+        }elseif($tabtype=="phonetabs"){
           $this->systab= new $tabtype($this->config, $this->config->data['TABS'][$tabobj], $this->dn,$type);
           $this->systab->set_acl_base($this->dn);
           $this->systab->by_object['phoneGeneric']->remove_from_parent ();