Code

Grouptabs: Error when saving group with environmenttab, if tab wasn't executed before.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Sep 2005 05:46:49 +0000 (05:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Sep 2005 05:46:49 +0000 (05:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1293 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 64b31c7bfdba82a3d8c4c2be4e45fc604cd8bd39..4177481b96ac6c0756666db3c74e6565be8c884e 100644 (file)
@@ -158,6 +158,12 @@ class environment extends plugin
       $this->useProfile = false;
     }
 
+    /* Set to group environment if we editing a group */
+    if(!isset($this->parent)){
+      $this->is_group = true;
+    }
+
+
   }
 
   function execute()
@@ -171,6 +177,7 @@ class environment extends plugin
 
     // 1. Account disabled . Editing from usermenu
     if((!isset($this->parent))&&(!$this->is_account)){
+      print "asdf";
       /* We are currently editing this tab from usermenu, but this account is not enabled */
       $smarty->assign("is_account",$this->is_account);
       /* Load template */
@@ -188,10 +195,10 @@ class environment extends plugin
         $this->uid          = $this->cn;
         $this->attrs['uid'] = $this->cn;
 
-          if (isset($_POST['modify_state'])){
-        $this->is_account= !$this->is_account;
-      }
+        if (isset($_POST['modify_state'])){
+          $this->is_account= !$this->is_account;
+        }
+
         // 3. Account enabled . Editing from adminmenu
         if ($this->is_account){
           $display= $this->show_header(_("Remove environment extension"),