Code

Added unified messages
[gosa.git] / gosa-core / plugins / admin / ogroups / tabs_ogroups.inc
index 6d3c018af5701249122f96eaa6bbeb1385339804..6c327ae34fa536a23ae00f013ffe8aa35d99fdea 100644 (file)
@@ -41,6 +41,11 @@ class ogrouptabs extends tabs
       unset($this->by_object['termgroup']);
       unset($this->by_name['termgroup']);
     }
+    if(!preg_match("/T/",$objects) &&(isset($this->by_object['termservice']))){
+      $this->by_object['termservice']->remove_from_parent();
+      unset($this->by_object['termservice']);
+      unset($this->by_name['termservice']);
+    }
     
     /* Remove ws tabs, if theres no ws left in the object list */
     if((!preg_match("/W/",$objects))&&(isset($this->by_object['workservice']))){
@@ -98,7 +103,13 @@ class ogrouptabs extends tabs
         $this->by_object['termgroup']->parent= &$this;
       }
     }
-    
+    if(preg_match("/T/",$objects) &&(!isset($this->by_object['termservice']))){
+      if(!isset($this->by_object['termservice'])){
+        $this->by_name['termservice']= _("Devices");
+        $this->by_object['termservice']= new termservice($this->config, $this->dn,$this->by_object['ogroup']);
+      }
+    }
+
     /* Add Workstation tabs */
     if((preg_match("/W/",$objects))&&(!isset($this->by_object['workservice']))){
         $this->by_name['workservice']= _("Devices");
@@ -194,6 +205,8 @@ class ogrouptabs extends tabs
           $this->by_object['termgroup']= new termgroup($this->config, $this->dn);
           $this->by_object['termgroup']->parent= &$this;
 
+          $this->by_name['termservice']= _("Devices");
+          $this->by_object['termservice']= new termservice($this->config, $this->dn,$this->by_object['ogroup']);
           break;
 
           case "U":
@@ -292,10 +305,6 @@ class ogrouptabs extends tabs
     }
 
     tabs::save();
-
-    /* Fix tagging if needed */
-               $baseobject->dn= $new_dn;
-    $baseobject->handle_object_tagging();
   }
 
   function getCopyDialog()