Code

Added unified messages
[gosa.git] / gosa-core / plugins / admin / ogroups / tabs_ogroups.inc
index 3485bb79f6f9462bd603abc451b67f9658e5ffeb..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":
@@ -272,7 +285,7 @@ class ogrouptabs extends tabs
 
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
-    $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
+    $new_dn= 'cn='.$baseobject->cn.','.get_ou('ogroupou').$baseobject->base;
 
     /* Move group? */
     if ($this->dn != $new_dn){
@@ -288,14 +301,10 @@ class ogrouptabs extends tabs
     }
 
     if ($this->dn == "new"){
-      $this->dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
+      $this->dn= 'cn='.$baseobject->cn.','.get_ou('ogroupou').$baseobject->base;
     }
 
     tabs::save();
-
-    /* Fix tagging if needed */
-               $baseobject->dn= $new_dn;
-    $baseobject->handle_object_tagging();
   }
 
   function getCopyDialog()