index 92a350e4dab9ca386ff4aa265565073dfd72c73c..7b2b6170fa0212b9197fd43fe74fec490882308b 100644 (file)
}
}
}
-
- $_SESSION['FAI_objects_to_save'][$Current_DN] = $addObj;
+ $FAI_objects_to_save = session::get('FAI_objects_to_save') ;
+ $FAI_objects_to_save[$Current_DN] = $addObj;
+ session::set('FAI_objects_to_save',$FAI_objects_to_save);
}
$to_save = array();
/* check which objects must be saved */
- foreach($_SESSION['FAI_objects_to_save'] as $Current_DN => $object){
+ $FAI_objects_to_save = session::get('FAI_objects_to_save');
+ foreach($FAI_objects_to_save as $Current_DN => $object){
if($object['diff']){
$sub_name = $Current_DN;
- while(isset($_SESSION['FAI_objects_to_save'][$sub_name])){
- $to_save[strlen($sub_name)][$sub_name] = $_SESSION['FAI_objects_to_save'][$sub_name];
- unset($_SESSION['FAI_objects_to_save'][$sub_name]);
+ while(isset($FAI_objects_to_save[$sub_name])){
+ $to_save[strlen($sub_name)][$sub_name] = $FAI_objects_to_save[$sub_name];
+ unset($FAI_objects_to_save[$sub_name]);
$sub_name = preg_replace('/^[^,]+,/', '', $sub_name);
}
}
}
+ session::set('FAI_objects_to_save',$FAI_objects_to_save);
/* Sort list of objects that must be saved, and ensure that
container objects are safed, before their childs are saved */
save_FAI_object($parent_obj,$objectAttrs);
if(($parent_obj != $Current_DN)){
- print_red(sprintf(_("Error, following objects should be equal '%s' and '%s'"),$parent_obj,$Current_DN));
+ msg_dialog::display(_("Error"), sprintf(_("Error, following objects should be equal '%s' and '%s'"),$parent_obj,$Current_DN), ERROR_DIALOG);
}
}
}