diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index a0f6199070612e57ac007ed79b109691cdaa5c94..0f7f3d37cde59dad074c0a1d37c5a322ea7cc0a0 100644 (file)
var $fai_activated = FALSE;
+ var $member_of_ogroup = FALSE;
+
function workstartup ($config, $dn= NULL, $parent= NULL)
{
/* Check if FAI is active */
plugin::plugin ($config, $dn, $parent);
+ if(!isset($this->parent->by_object['ogroup'])){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd ($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn"));
+ $this->member_of_ogroup = $ldap->count() >= 1;
+ }
+
/* Creating a list of valid Mirrors
* none will not be saved to ldap.
*/
$this->gotoBootKernels= array("default-inherited" => '['._("inherited").']');
/* Load hardware list */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
- if ($ldap->count() == 1){
+ if ($this->member_of_ogroup){
+
+ if(count($this->FAIclass)==0 && $this->FAIrelease == ""){
+ $this->FAIdebianMirror = "inherited";
+ }
if($this->fai_activated){
$map= array("gotoLdapServer","FAIclass","FAIdebianMirror");
}
}
- if(count($this->FAIclass)==0 && $this->FAIrelease == ""){
- $this->FAIdebianMirror = "inherited";
- }
-
/* Turn to default, if we've nothing to inherit */
if (!isset($this->gotoBootKernels['default-inherited']) && $this->gotoBootKernel == "default-inherited"){
$this->gotoBootKernel= "default";
function getFAIdebianMirrors()
{
$ret = array();
- $ret['inherited']="["._("inherited")."]";
+
+ /* Only add inherit option, if we are part in an object group
+ */
+ if($this->member_of_ogroup) {
+ $ret['inherited']="["._("inherited")."]";
+ }
+
$ret['auto']=_("automatic");
$secs = array();
{
plugin::PrepareForCopyPaste($source);
-
- /* Get arrays */
- foreach (array("gotoModules", "gotoAutoFs", "gotoFilesystem","gotoKernelParameters") as $val){
- $this->$val = array();
- if (isset($source["$val"]["count"])){
- for ($i= 0; $i<$source["count"]; $i++){
- if (isset($source["$val"][$i])){
- array_push($this->$val, $source["$val"][$i]);
- }
- }
- }
- sort ($this->$val);
- $this->$val= array_unique($this->$val);
- }
-
- /* Prepare Shares */
- if((isset($source['gotoShare']))&&(is_array($source['gotoShare']))){
- unset($source['gotoShare']['count']);
- foreach($source['gotoShare'] as $share){
- $tmp = $tmp2 = array();
- $tmp = split("\|",$share);
- $tmp2['server'] =$tmp[0];
- $tmp2['name'] =$tmp[1];
- $tmp2['mountPoint'] =$tmp[2];
- $this->gotoShares[$tmp[1]."|".$tmp[0]]=$tmp2;
- }
+ $source_o = new workstartup ($this->config, $source['dn']);
+
+ foreach(array("gotoModules", "gotoAutoFs", "gotoFilesystem","gotoKernelParameters","gotoShares","customParameters") as $attr){
+ $this->$attr = $source_o->$attr;
}
}
+
/* Return plugin informations for acl handling */
function plInfo()
{