index 9aa4aa826832cbe26f9ca596929a46f1cf10dfaa..13b923a8b0cbd45c1014b117e408b4058d9de4a3 100644 (file)
/* First search for every ou, in given fai base
* With a second search detect all object that belong to the different ous.
*/
/* First search for every ou, in given fai base
* With a second search detect all object that belong to the different ous.
*/
+
$base = "ou=fai,ou=configs,ou=systems,".$faifilter['base'];
$base = "ou=fai,ou=configs,ou=systems,".$faifilter['base'];
+ if($faifilter['branch'] != "main"){
+ $base = $faifilter['branch'];
+ }
$ldap = $this->config->get_ldap_link();
$res = get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",FALSE, $base, array("cn","description","objectClass"),TRUE);
$used = array();
$ldap = $this->config->get_ldap_link();
$res = get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",FALSE, $base, array("cn","description","objectClass"),TRUE);
$used = array();
/* Skip profiles */
if(!in_array("FAIprofile",$object['objectClass'])){
/* Skip profiles */
if(!in_array("FAIprofile",$object['objectClass'])){
- $used[$object['cn'][0]]= $object['cn'][0];
+ if(isset($object['cn'])){
+ $used[$object['cn'][0]]= $object['cn'][0];
+ }
}
}
}
}
}
}
*/
if(count ($used)==0){
$smarty->assign("ClassNamesAvailable", " disabled ");
*/
if(count ($used)==0){
$smarty->assign("ClassNamesAvailable", " disabled ");
+ $smarty->assign("grey", 'style="color:#C0C0C0"');
}else{
$smarty->assign("ClassNamesAvailable", "");
}else{
$smarty->assign("ClassNamesAvailable", "");
+ $smarty->assign("grey", "");
}
$smarty->assign("ClassNames", $used);
$smarty->assign("ClassNameKeys", $used);
}
$smarty->assign("ClassNames", $used);
$smarty->assign("ClassNameKeys", $used);