Code

Switched order of tabs
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 May 2008 09:46:26 +0000 (09:46 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 May 2008 09:46:26 +0000 (09:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10980 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 843b5452e9a8110ed9293a1ad03a0368a3db1f61..f8eeab1eb6127c6dc409a433d9e6ea39e423ca0d 100644 (file)
@@ -179,6 +179,25 @@ class ogrouptabs extends tabs
       }
     }
 
+    /* Add environment tab if user or group is member in this object group*/
+    if(class_available("environment")){
+      if((preg_match("/G/",$objects) || preg_match("/U/",$objects)) && !isset($this->by_name['environment'])){
+        $this->by_name['environment']= _("Environment");
+        $this->by_object['environment']= new environment($this->config, $this->dn);
+        $this->by_object['environment']->acl = "#all#";
+        $this->by_object['environment']->parent= &$this;
+      }
+    }
+
+    /* Remove environment tab if not required any longer */
+    if(class_available("environment")){
+      if(!preg_match("/G/",$objects) && !preg_match("/U/",$objects) && isset($this->by_name['environment'])){
+        $this->by_object['environment']->remove_from_parent();
+        unset($this->by_name['environment']);
+        unset($this->by_object['environment']);
+      }
+    }
+
     /* Add application tab if user or group is member in this object group*/
     if(class_available("appgroup")){
       if((preg_match("/G/",$objects) || preg_match("/U/",$objects)) && !isset($this->by_name['appgroup'])){
@@ -198,24 +217,6 @@ class ogrouptabs extends tabs
       }
     }
 
-    /* Add environment tab if user or group is member in this object group*/
-    if(class_available("environment")){
-      if((preg_match("/G/",$objects) || preg_match("/U/",$objects)) && !isset($this->by_name['environment'])){
-        $this->by_name['environment']= _("Environment");
-        $this->by_object['environment']= new environment($this->config, $this->dn);
-        $this->by_object['environment']->acl = "#all#";
-        $this->by_object['environment']->parent= &$this;
-      }
-    }
-
-    /* Remove environment tab if not required any longer */
-    if(class_available("environment")){
-      if(!preg_match("/G/",$objects) && !preg_match("/U/",$objects) && isset($this->by_name['environment'])){
-        $this->by_object['environment']->remove_from_parent();
-        unset($this->by_name['environment']);
-        unset($this->by_object['environment']);
-      }
-    }
     /* Move reference tab to second position from right */
     if(class_available("acl")){
       if(isset($this->by_name['acl'])){