diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 4a20ab0e7ab7eede35916161b873cf317123e6eb..3fd299e6bae458c1c3231a4709721bf075788856 100644 (file)
$this->dialog= FALSE;
FAI::save_release_changes_now();
$to_del = FAI::clean_up_releases($dn);
+ /* Remove sub-objects (e.g. the variable key/value of a FAIvariable) from LDAP entirely */
+ $children = FAI::get_child_objects($dn);
+ if ($children) {
+ $to_del += $children;
+ }
foreach($to_del as $dn){
$ldap->rmdir_recursive($dn);
}
****************/
if ($s_action=="del_multiple" ||
- $this->dialog instanceOf faiGroupHandle && $this->dialog->get_mode() == "remove"){
+ $this->dialog instanceOf faiGroupHandle &&
+ $this->dialog->get_mode() == "remove" &&
+ !isset($_POST['delete_multiple_fai_object_cancel'])){
/* Collect objects to delete and check if objects are freezed
*/
if(isset($_POST['delete_multiple_fai_object_cancel'])){
$this->remove_lock();
$this->dns = array();
+ $this->dialog = FALSE;
}
/****************
}else{
$this->dialog->save();
FAI::save_release_changes_now();
+ $to_del = FAI::clean_up_releases($this->dn, false);
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->dn);
+ foreach($to_del as $dn){
+ /* Only delete subobjects of the current FAI class */
+ $ldap->cd($this->dn);
+ $ldap->search("(|(objectClass=FAIclass)(objectClass=FAIdebconfInfo))", array('dn'));
+ if ($ldap->count()){
+ while($attrs = $ldap->fetch()){
+ if ($attrs['dn'] == $dn) {
+ $ldap->rmdir_recursive($dn);
+ }
+ }
+ }
+ }
if (!isset($_POST['edit_apply'])){
$this->remove_lock();
$this->dialog=FALSE;
}
$res = FAI::get_all_objects_for_given_base($base,"(|".$f.")",TRUE);
}else{
- $res = FAI::get_all_objects_for_given_base($base,"(objectClass=".$oc.")",TRUE);
+ $res = FAI::get_all_objects_for_given_base($base,"(|(objectClass=FAIprofile)(objectClass=".$oc."))",TRUE);
}
$delete = array();
$used = array();