X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Ffai%2Fadmin%2Ffai%2Fclass_FAI.inc;h=b6ef2a6125cae94dd430be037d543df5d9b1cd45;hb=cb773874cb502bc0f01aeefc43849e0522e1a4d9;hp=1123681049897bb186f1f014d1405c3356808b94;hpb=86b7ca5074da43757eaf31ebbc4433a3f869bc52;p=gosa.git
diff --git a/gosa-plugins/fai/admin/fai/class_FAI.inc b/gosa-plugins/fai/admin/fai/class_FAI.inc
index 112368104..b6ef2a612 100644
--- a/gosa-plugins/fai/admin/fai/class_FAI.inc
+++ b/gosa-plugins/fai/admin/fai/class_FAI.inc
@@ -63,8 +63,8 @@ class FAI
foreach($deps_to_search as $fai_base){
/* Ldap search for fai classes specified in this release */
- $attributes = array("dn","objectClass","FAIstate","cn","FAIdiskType","FAIlvmDevice");
- $res_tmp = get_list($filter,"fai",$fai_base,$attributes,GL_SUBSEARCH | GL_SIZELIMIT);
+ $attributes = array("dn","objectClass","FAIstate","cn","FAIdiskType","FAIlvmDevice","FAIdiskOption");
+ $res_tmp = get_list($filter,"fai",$fai_base,$attributes,GL_SUBSEARCH);
/* check the returned objects, and add/replace them in our return variable */
foreach($res_tmp as $attr){
@@ -103,6 +103,11 @@ class FAI
$buffer['FAIdiskType'] = "old";
}
+ if(isset($attr['FAIdiskOption'])){
+ $buffer['FAIdiskOption'] = $attr['FAIdiskOption'];
+ } else {
+ $buffer['FAIdiskOption'] = null;
+ }
if(isset($attr['FAIlvmDevice'])){
$buffer['FAIlvmDevice'] = $attr['FAIlvmDevice'];
}
@@ -161,7 +166,7 @@ class FAI
{
global $config;
- if(!preg_match("/".preg_quote(get_ou('faiBaseRDN'), '/')."/",$dn)){
+ if(!preg_match("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",$dn)){
$base = get_ou('faiBaseRDN').$dn;
}else{
$base = $dn;
@@ -173,7 +178,7 @@ class FAI
$ldap->search("(objectClass=FAIbranch)",array("ou","dn"));
while($attrs = $ldap->fetch()){
if($appendedName){
- $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".preg_quote(get_ou('faiBaseRDN'), '/').".*$/","",$attrs['dn']));
+ $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".preg_quote(get_ou('faiBaseRDN'), '/').".*$/i","",$attrs['dn']));
}else{
$res[$attrs['dn']] = $attrs['ou'][0];
}
@@ -217,7 +222,7 @@ class FAI
/* Dont't try to modify non FAIclasses
*/
- if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"), '/')."/",$obj_dn)){
+ if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"), '/')."/i",$obj_dn)){
trigger_error("PLEASE check fai class handling in ".__LINE__." -> ".__FILE__);
echo "
-->".$Current_DN."
";
echo "
-->".$obj_dn."
";
@@ -238,8 +243,7 @@ class FAI
$classes = FAI::get_all_objects_for_given_base(FAI::get_release_dn($Current_DN),
"(&(objectClass=FAIclass)(cn=".$cn."))");
- /* Check if this is the last class with this name.
- */
+ /* Check if this is the last class with this name */
if(count($classes) == 1){
/* Get all FAI Profiles
@@ -531,6 +535,13 @@ class FAI
*/
$rTag = FAI::get_release_tag(FAI::get_release_dn($key));
$parent_attrs['FAIstate'] = $rTag;
+
+ /* FAItemplateFile can be binary, therefore it needs to be fetched with
+ * $ldap->get_attribute */
+ if (isset($parent_attrs['FAItemplateFile'])) {
+ $parent_attrs['FAItemplateFile'] = $ldap->get_attribute($parent_obj, 'FAItemplateFile');
+ }
+
FAI::save_FAI_object($key,$parent_attrs);
}
}
@@ -881,12 +892,12 @@ class FAI
$start = microtime(TRUE);
$source_release = trim($source_release,"/");
- echo "
"; + echo "