Code

Added check for FAIstate attribute, its objectClass was removed
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Jun 2006 04:46:14 +0000 (04:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Jun 2006 04:46:14 +0000 (04:46 +0000)
when no Class was defined

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

plugins/admin/systems/class_workstationStartup.inc

index d1213b4bd98d31393a609f51882c1cc44a51caf0..893939093660948d9f7016770ec15e1252d71a7b 100644 (file)
@@ -1000,8 +1000,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 +1028,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);