From beee3a79e0c59be7d6fad49d40bcb3f665b00a15 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 5 Jan 2010 16:58:05 +0000 Subject: [PATCH] We are no able again to save and remove entries git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15065 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiManagement.inc | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 73652a2db..3f1f8e433 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -179,6 +179,58 @@ class faiManagement extends management } + /*! \brief Object removal was confirmed, now remove the requested entries. + * + * @param String 'action' The name of the action which was the used as trigger. + * @param Array 'target' A list of object dns, which should be affected by this method. + * @param Array 'all' A combination of both 'action' and 'target'. + */ + function removeEntryConfirmed($action="",$target=array(),$all=array(), + $altTabClass="",$altTabType="",$altAclCategory="") + { + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + foreach($this->dns as $key => $dn){ + $ldap->cat($dn); + if($ldap->count()){ + $attrs = $ldap->fetch(); + $type= $this->get_type($attrs); + management::removeEntryConfirmed($action,array($dn),$all,$type[0],$type[2],$type[1]); + + // Now save changes + FAI::save_release_changes_now(); + $to_del = FAI::clean_up_releases($dn); + foreach($to_del as $dn){ + $ldap->rmdir_recursive($dn); + } + } + } + } + + protected function saveChanges() + { + management::saveChanges(); + + // Now save changes + FAI::save_release_changes_now(); + $to_del = FAI::clean_up_releases($this->last_dn); + foreach($to_del as $dn){ + $ldap->rmdir_recursive($dn); + } + } + + protected function applyChanges() + { + management::applyChanges(); + + // Now save changes + FAI::save_release_changes_now(); + $to_del = FAI::clean_up_releases($this->last_dn); + foreach($to_del as $dn){ + $ldap->rmdir_recursive($dn); + } + } + function detectPostActions() { $action = management::detectPostActions(); -- 2.30.2