Code

Updated ogroup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Jan 2008 10:07:08 +0000 (10:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Jan 2008 10:07:08 +0000 (10:07 +0000)
-Fixed tab handling for terminals workstations

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

gosa-core/plugins/admin/ogroups/tabs_ogroups.inc

index adcc709f596173e9fb467ad8a2b1594dd30d87bb..6c327ae34fa536a23ae00f013ffe8aa35d99fdea 100644 (file)
@@ -41,7 +41,7 @@ class ogrouptabs extends tabs
       unset($this->by_object['termgroup']);
       unset($this->by_name['termgroup']);
     }
-    if(((!preg_match("/T/",$objects)) && (!preg_match("/W/",$objects)))&&(isset($this->by_object['termservice']))){
+    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']);
@@ -102,13 +102,14 @@ class ogrouptabs extends tabs
         $this->by_object['termgroup']->inheritTimeServer = false;
         $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']= _("Service");
-        $this->by_object['termservice']= new termservice($this->config, $this->dn);
-        $this->by_object['termservice']->parent= &$this;
+        $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");
@@ -204,9 +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']= _("Service");
-          $this->by_object['termservice']= new termservice($this->config, $this->dn);
-          $this->by_object['termservice']->parent= &$this;
+          $this->by_name['termservice']= _("Devices");
+          $this->by_object['termservice']= new termservice($this->config, $this->dn,$this->by_object['ogroup']);
           break;
 
           case "U":