Commit fdddf9f2 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2311 Fixing FAI RDN dynamic handling

parent a139db9a
......@@ -164,19 +164,14 @@ class FAI
/* Return all relevant FAI departments */
static function get_FAI_departments($suffix = "")
{
$arr = array("hooks","scripts","disk","packages","profiles","templates","variables");
$tmp = array();
if(preg_match("/^,/",$suffix)){
$suffix = preg_replace("/^,/","",$suffix);
}
foreach($arr as $name){
if(empty($suffix)){
$tmp[$name] = "ou=".$name;
}else{
$tmp[$name] = "ou=".$name.",".$suffix;
return array_map(
function ($name)
{
return get_ou('fai'.$name.'RDN').$suffix;
}
}
return($tmp);
,
array('Hook','Script','Partition','Package','Profile','Template','Variable')
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment