Code

Fixed tab handling, some tabs may not be initialized
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 06:49:00 +0000 (06:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 06:49:00 +0000 (06:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5205 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/tabs_workstation.inc

index 138c2d4ede2fb2b4c50040aa83abb88713cbdc38..0fe5667ea5a861556fbdda8f23f5b3a054cef8d0 100644 (file)
@@ -38,6 +38,12 @@ class worktabs extends tabs
   function save_object($save_current= FALSE)
   {
     tabs::save_object($save_current);
+
+    /* Assign current cn */
+    $baseobject= $this->by_object['workgeneric'];
+    foreach ($this->by_object as $key => $obj){
+      $this->by_object[$key]->cn= $baseobject->cn;
+    }
   }
 
 
@@ -56,8 +62,10 @@ class worktabs extends tabs
 
     tabs::save(TRUE);
 
-    if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){
-      $this->by_object['printgeneric']->remove_from_parent();
+    if(isset($this->by_object['printgeneric'])){
+      if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){
+        $this->by_object['printgeneric']->remove_from_parent();
+      }
     }
 
     /* Fix tagging if needed */