diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index be645996ff75d16e02a3f86fc9d94eb84cca98f3..4b55ee073be156e1a7531b5ef5187f8f08a2b09e 100644 (file)
var $FAIServRepConfig = array();
var $fai_activated = FALSE;
+ var $member_of_ogroup = FALSE;
function workstartup ($config, $dn= NULL, $parent= NULL)
{
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.
*/
"(objectClass=FAIprofile)".
"(objectClass=FAIpartitionTable))",
$ui->subtreeACL,$this->config->current['BASE'],
- array("cn","objectClass","FAIdebianSection"));
+ array("cn","objectClass","FAIdebianSection","description"));
foreach($res as $attr){
$cn = $attr['cn'][0];
$tmp2[$cn]['FAIpackageList']['obj'] = 'FAIpackageList';
$tmp2[$cn]['FAIpackageList']['kzl'] = 'Pl';
$tmp2[$cn]['FAIpackageList']['sec'] = $attr['FAIdebianSection'];
+ $tmp2[$cn]['FAIpackageList']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
if(in_array('FAItemplate',$attr['objectClass'])){
$tmp2[$cn]['FAItemplate']['obj'] = 'FAItemplate';
$tmp2[$cn]['FAItemplate']['kzl'] = 'T';
+ $tmp2[$cn]['FAItemplate']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
if(in_array('FAIvariable',$attr['objectClass'])){
$tmp2[$cn]['FAIvariable']['obj'] = 'FAIvariable';
$tmp2[$cn]['FAIvariable']['kzl'] = 'V';
+ $tmp2[$cn]['FAIvariable']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
if(in_array('FAIscript',$attr['objectClass'])){
$tmp2[$cn]['FAIscript']['obj'] = 'FAIscript';
$tmp2[$cn]['FAIscript']['kzl'] = 'S';
+ $tmp2[$cn]['FAIscript']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
if(in_array('FAIhook',$attr['objectClass'])){
$tmp2[$cn]['FAIhook']['obj'] = 'FAIhook';
$tmp2[$cn]['FAIhook']['kzl'] = 'H';
+ $tmp2[$cn]['FAIhook']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
if(in_array('FAIpartitionTable',$attr['objectClass'])){
$tmp2[$cn]['FAIpartitionTable']['obj']= 'FAIpartitionTable';
$tmp2[$cn]['FAIpartitionTable']['kzl']= 'Pt';
+ $tmp2[$cn]['FAIpartitionTable']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
if(in_array('FAIprofile',$attr['objectClass'])){
$tmp2[$cn]['FAIprofile']['obj']= 'FAIprofile';
$tmp2[$cn]['FAIprofile']['kzl']= 'P';
+ $tmp2[$cn]['FAIprofile']['desc'] = $attr['description'];
$this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
}
}
/* 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","gotoBootKernel");
$this->gotoBootKernel= "default";
}
- if(count($this->FAIclass)==0 && $this->FAIrelease == ""){
- $this->FAIdebianMirror = "inherited";
- }
}
}
}
$i ++ ;
+
+ $desc = "";
+ foreach($this->FAIclassInfo[$class] as $types ){
+ if(isset($types['desc'][0])){
+ $desc.= $types['desc'][0]." ";
+ }
+ }
+ if(!empty($desc)){
+ $desc = " [".trim($desc)."]";
+ }
$div->AddEntry(array(
- array("string"=>$class.$marker),
+ array("string"=>$class.$desc.$marker),
array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'")
));
}
-
$smarty->assign("FAIScriptlist",$div->DrawList());
}
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();