index 8d8213b83c1f74473447df826e16c7bb180df7f2..42783ab3662382fb50359698ed31fe324baa4cc3 100644 (file)
$this->Result = array();
$_SESSION['faiSummaryTab']['UniqueID'] = 0;
$tmp = $this->getBranches();
-
+
+
/* Get classes & release name
There are 2 different tabs which use the summary tab
faiProfile / Workstations */
}elseif(isset($this->parent->by_name['workstartup'])){
$this->Classes = $this->parent->by_object['workstartup']->FAIclass;
$this->Release = $this->parent->by_object['workstartup']->FAIrelease;
+
+ /* Append workstation class && LAST */
+ if(isset($this->parent->by_object['workgeneric']->cn)){
+ $this->Classes[] = $this->parent->by_object['workgeneric']->cn;
+ }
+
$tmp = array_flip($tmp);
if(!isset($tmp[$this->Release])) {
$this->Release = "";
}
}
+ $this->Classes[] = "LAST";
+
/* Set all available releases */
$this->Releases = array_flip($this->getBranches());
$this->usedClasses = array();
$ret = array("main"=>"/");
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- if(!$base){
- $base= "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
- }
- $ldap->cd($base);
- $ldap->ls("(objectClass=FAIbranch)",$base);
+ $ldap->search("(objectClass=FAIbranch)",array("dn","cn","ou"));
while($attrs = $ldap->fetch()){
if((isset($attrs['ou']))&&($attrs['dn']!=$base)){
- $ret[$attrs['dn']]= $prefix.$attrs['ou'][0];
- $ret = array_merge($ret,$this->getBranches($attrs['dn'],"".$prefix.$attrs['ou'][0]."/"));
+ $name = convert_department_dn(preg_replace("/,ou=fai,.*$/","",$attrs['dn']));
+ $ret[$attrs['dn']] = $name;
+ $ret = array_merge($ret,$this->getBranches($attrs['dn'],$prefix.$attrs['ou'][0]."/"));
}
}
return($ret);
function createSummary($data)
{
/* Don't generate any output, if there is no result */
- $str ="<table style='width:100%;background:#F5F5F5;'> ";
+ $str ="<table cellspacing=0 cellpadding=2 style='width:100%;background:#F5F5F5;'> ";
if(!count($this->Result)){
$str.="<tr><td>";
$str.= (_("This object has no FAI classes assigned."));