index 78861fb18e299995febf183880edc0e8d011f9c0..b6ef2a6125cae94dd430be037d543df5d9b1cd45 100644 (file)
/* Ldap search for fai classes specified in this release */
$attributes = array("dn","objectClass","FAIstate","cn","FAIdiskType","FAIlvmDevice","FAIdiskOption");
/* Ldap search for fai classes specified in this release */
$attributes = array("dn","objectClass","FAIstate","cn","FAIdiskType","FAIlvmDevice","FAIdiskOption");
- $res_tmp = get_list($filter,"fai",$fai_base,$attributes,GL_SUBSEARCH | GL_SIZELIMIT);
+ $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){
/* check the returned objects, and add/replace them in our return variable */
foreach($res_tmp as $attr){
{
global $config;
{
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;
$base = get_ou('faiBaseRDN').$dn;
}else{
$base = $dn;
$ldap->search("(objectClass=FAIbranch)",array("ou","dn"));
while($attrs = $ldap->fetch()){
if($appendedName){
$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];
}
}else{
$res[$attrs['dn']] = $attrs['ou'][0];
}
/* Dont't try to modify non FAIclasses
*/
/* 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 "<br>-->".$Current_DN."<br>";
echo "<br>-->".$obj_dn."<br>";
trigger_error("PLEASE check fai class handling in ".__LINE__." -> ".__FILE__);
echo "<br>-->".$Current_DN."<br>";
echo "<br>-->".$obj_dn."<br>";
$classes = FAI::get_all_objects_for_given_base(FAI::get_release_dn($Current_DN),
"(&(objectClass=FAIclass)(cn=".$cn."))");
$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
if(count($classes) == 1){
/* Get all FAI Profiles
*/
$rTag = FAI::get_release_tag(FAI::get_release_dn($key));
$parent_attrs['FAIstate'] = $rTag;
*/
$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);
}
}
FAI::save_FAI_object($key,$parent_attrs);
}
}
$start = microtime(TRUE);
$source_release = trim($source_release,"/");
$start = microtime(TRUE);
$source_release = trim($source_release,"/");
- echo "<h2>".sprintf(_("Creating group application release for %s"),$destination_name)."</h2>";
+ echo "<h3>".sprintf(_("Creating group application release for %s"),$destination_name)."</h3>";
$sub_releases = array();
$source_dn = "";
$sub_releases = array();
$source_dn = "";
- $tmp = split("\/",$source_release);
+ $tmp = explode("/",$source_release);
foreach($tmp as $part){
if(empty($part)){
continue;
foreach($tmp as $part){
if(empty($part)){
continue;
$ldap->search("(objectClass=FAIbranch)",array("ou","FAIstate"));
while($attrs = $ldap->fetch()){
foreach($sub_releases as $sub_rel){
$ldap->search("(objectClass=FAIbranch)",array("ou","FAIstate"));
while($attrs = $ldap->fetch()){
foreach($sub_releases as $sub_rel){
- if(preg_match("/^".preg_quote($sub_rel.get_ou('faiBaseRDN'), '/')."/",$attrs['dn'])){
+ if(preg_match("/^".preg_quote($sub_rel.get_ou('faiBaseRDN'), '/')."/i",$attrs['dn'])){
$f_releases[$sub_rel.get_ou('faiBaseRDN')] = $attrs;
}
}
$f_releases[$sub_rel.get_ou('faiBaseRDN')] = $attrs;
}
}
/* Display current action information.
*/
if($is_first){
/* Display current action information.
*/
if($is_first){
- echo "<h2>".sprintf(_("Creating copy of %s"),"<i>".LDAP::fix($sourcedn)."</i>")."</h2>";
+ echo "<h3>".sprintf(_("Creating copy of %s"),"<i>".LDAP::fix($sourcedn)."</i>")."</h3>";
}else{
if(preg_match("/^ou=/",$sourcedn)){
echo "<h3>"._("Processing")." <i>".LDAP::fix($destinationdn)."</i></h3>";
}else{
}else{
if(preg_match("/^ou=/",$sourcedn)){
echo "<h3>"._("Processing")." <i>".LDAP::fix($destinationdn)."</i></h3>";
}else{
- $tmp = split(",",$sourcedn);
+ $tmp = explode(",",$sourcedn);
echo " <b>"._("Object").":</b> ";
$deststr = LDAP::fix($destinationdn);
if(strlen($deststr) > 96){
echo " <b>"._("Object").":</b> ";
$deststr = LDAP::fix($destinationdn);
if(strlen($deststr) > 96){
}
}
if($is_first){
}
}
if($is_first){
- echo "<p class='seperator'> </p>";
+ echo "<hr>";
}
}
}
}