X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=trunk%2Fgosa-plugins%2Fgoto%2Fadmin%2Fsystems%2Fgoto%2Fclass_workstationStartup.inc;h=58fc74ed2abb701be2b1b1a58d21a7d72ac0cb6c;hb=4ff0d6f0148cdbf6452411037aa91409c955cf45;hp=1460629097d3757677d1313780411bb1f15c4da3;hpb=a3a97eb41361b68f887e8200c5935d39a6b42d3f;p=gosa.git diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 146062909..58fc74ed2 100644 --- a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -7,7 +7,6 @@ class workstartup extends plugin var $gotoLdap_inherit = FALSE; /* Generic terminal attributes */ - var $bootmode = "G"; var $gotoBootKernel = "default-inherited"; var $gotoKernelParameters = ""; var $gotoLdapServer = "default-inherited"; @@ -19,7 +18,7 @@ class workstartup extends plugin /* attribute list for save action */ var $attributes = array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters", - "FAIclass", "FAIstatus", "gotoShare","FAIdebianMirror", "FAIrelease"); + "FAIclass", "FAIstate", "FAIstatus", "gotoShare","FAIdebianMirror", "FAIrelease"); var $objectclasses = array("GOhard", "FAIobject"); /* Share */ @@ -36,6 +35,7 @@ class workstartup extends plugin var $FAIclass = array(); // The currently selected classes var $FAIrelease = ""; var $FAIdebianMirror = "auto"; + var $FAIstate = ""; var $si_active = FALSE; var $si_fai_action_failed = FALSE; @@ -669,23 +669,6 @@ class workstartup extends plugin }// END FAI output generation $smarty->assign("FAIScriptlist",$div->DrawList()); - /* Radio button group */ - if (preg_match("/G/", $this->bootmode)) { - $smarty->assign("graphicalbootup", "checked"); - } else { - $smarty->assign("graphicalbootup", ""); - } - if (preg_match("/T/", $this->bootmode)) { - $smarty->assign("textbootup", "checked"); - } else { - $smarty->assign("textbootup", ""); - } - if (preg_match("/D/", $this->bootmode)) { - $smarty->assign("debugbootup", "checked"); - } else { - $smarty->assign("debugbootup", ""); - } - /* Show main page */ $smarty->assign("gotoKernelParameters",$this->gotoKernelParameters); return($smarty->fetch (get_template_path('workstationStartup.tpl', TRUE,dirname(__FILE__)))); @@ -694,6 +677,18 @@ class workstartup extends plugin function remove_from_parent() { + /* Cancel if there's nothing to do here */ + if ((!$this->acl_is_removeable())){ + return; + } + + /* Remove and write to LDAP */ + plugin::remove_from_parent(); + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->dn); + $this->cleanup(); + $this->attrs['gotoModules'] = array(); + $ldap->modify($this->attrs); $this->handle_post_events("remove"); new log("remove","workstation/".get_class($this),$this->dn); } @@ -723,11 +718,6 @@ class workstartup extends plugin }else{ $this->gotoLdap_inherit = FALSE; } - - /* Save group radio buttons */ - if ($this->acl_is_writeable("bootmode") && isset($_POST["bootmode"])){ - $this->bootmode= $_POST["bootmode"]; - } } } @@ -789,21 +779,6 @@ class workstartup extends plugin } } - if ($this->gotoKernelParameters == "") { - /* Add semi automatic values if empty */ - // FIXME: LDAP Server may not be set here... - $this->gotoKernelParameters= "ldap=".base64_encode($this->gotoLdapServer); - - switch ($this->bootmode){ - case "D": - $this->gotoKernelParameters.= " debug"; - break; - case "G": - $this->gotoKernelParameters.= " splash=silent"; - break; - } - } - plugin::save(); unset( $this->attrs['FAIrelease'] ); @@ -845,7 +820,7 @@ class workstartup extends plugin } } - if ($this->attrs['gotoBootKernel'] == "default-inherited"){ + if ($this->gotoBootKernel == "default-inherited"){ $this->attrs['gotoBootKernel']= array(); } @@ -989,11 +964,16 @@ class workstartup extends plugin function PrepareForCopyPaste($source) { plugin::PrepareForCopyPaste($source); + $source_o = new workstartup ($this->config, $source['dn']); foreach(array("FAIclass","gotoModules", "gotoAutoFs", "gotoFilesystem", - "gotoKernelParameters","gotoShares") as $attr){ + "FAIstate", "FAIrelease", "gotoKernelParameters","gotoShares", + "gotoLdapServers", "gotoLdap_inherit") as $attr){ $this->$attr = $source_o->$attr; } + if (isset($source['FAIstate'])) { + $this->attrs['FAIstate'] = $source['FAIstate']; + } }