Code

Added conflict with kolab
[gosa.git] / plugins / admin / systems / class_workstationStartup.inc
index 5f1952d128732bf6e32faf61ed168ae786060c1e..88e4d38c79874a6407dc76556dfed5729f732056 100644 (file)
@@ -118,8 +118,11 @@ class workstartup extends plugin
       natcasesort($this->FAIclasses);
     }
 
-    $this->FAIclassInfo = $tmp2;
-
+    if(isset($tmp2)){
+      $this->FAIclassInfo = $tmp2;
+    } else {
+      $this->FAIclassInfo = array();
+    }
 
     /* Build up an array like this one :
         [$url]['SERVER'] = 'srv1-002';
@@ -268,7 +271,7 @@ class workstartup extends plugin
     $ldap->cd($this->config->current['BASE']);
     $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
     if ($ldap->count() == 1){
-      $map= array("gotoLdapServer","gotoBootKernel","FAIclass","FAIdebianMirror");
+      $map= array("gotoLdapServer","FAIclass","FAIdebianMirror");
       $attrs= $ldap->fetch();
 
       foreach ($map as $name){
@@ -662,9 +665,9 @@ class workstartup extends plugin
 
       $SelectBoxLdapServer->AddEntry(
           array(
-            array("string"=>$display),
             array("string"=>"<input type='radio' name='gotoLdapServer' value='".$key."' ".$use.">",
-                  "attach"=>"style='border-right:0px;'")
+                  "attach"=>"style='border-left:0px;'"),
+            array("string"=>$display)
             ));
     }    
 
@@ -1000,8 +1003,14 @@ class workstartup extends plugin
       $this->FAIdebianMirror = "";
     }
    
+    /* Get FAIstate from object, the generic tab could have changed it during execute */
+    $ldap= $this->config->get_ldap_link();
+    $ldap->cd($this->dn);
+    $ldap->cat($this->dn,array("FAIstate"));
+    $checkFAIstate = $ldap->fetch();
+
     /* Remove FAI objects if no FAI class is selected */ 
-    if(count($this->FAIclass)==0){
+    if((count($this->FAIclass)==0) && (!isset($checkFAIstate['FAIstate']))){
       $tmp = array();
       foreach($this->attrs['objectClass'] as $class){
         if($class != "FAIobject"){
@@ -1022,8 +1031,6 @@ class workstartup extends plugin
     }
     $this->attrs['gotoShare']=$tmp;
 
-    $ldap= $this->config->get_ldap_link();
-    $ldap->cd($this->dn);
     $this->cleanup();
     $ldap->modify ($this->attrs);