From 72a2ed8eccf7d8727a7ddd399d80b378e72fc2eb Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 7 Jul 2006 04:57:51 +0000 Subject: [PATCH] Updated faiManagement release creation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4037 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiManagement.inc | 28 +++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index c64e6285d..f0bf4d00a 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -196,6 +196,13 @@ class faiManagement extends plugin unset ($this->dialog); gosa_log ("FAI class '".$this->dn."' has been removed"); $this->dialog= NULL; + $to_del = clean_up_releases($this->dn); + + foreach($to_del as $dn){ + $ldap->rmdir_recursive($dn); + gosa_log(sprintf(_("Release cleanup : Removing object (tagged as remvoed) that is no longer in use '%s'."),$dn)); + } + } else { /* Normally this shouldn't be reached, send some extra @@ -392,12 +399,25 @@ class faiManagement extends plugin $ldap->cd ($this->config->current['BASE']); $ldap->copy_FAI_resource_recursive($mimesrc,$mimedst,$NewReleaseName,$type,true); + + $attr = array(); + $attr['objectClass'] = array("organizationalUnit","FAIbranch"); + $attr['ou'] = $name; + $ldap->cd($this->config->current['BASE']); + $ldap->cd("ou=".$name.",".$baseToUse); + $ldap->cat("ou=".$name.",".$baseToUse); + if($ldap->count()){ + $ldap->modify($attr); + }else{ + $ldap->add($attr); + } + /* Duplicate fai objects */ - $ldap->cd ("ou=".$name.",".$baseToUse); - $ldap->recursive_remove(); - $ldap->cd ($this->config->current['BASE']); - $ldap->copy_FAI_resource_recursive($baseToUse,"ou=".$name.",".$baseToUse,$NewReleaseName,$type,true); +// $ldap->cd ("ou=".$name.",".$baseToUse); +// $ldap->recursive_remove(); +// $ldap->cd ($this->config->current['BASE']); +// $ldap->copy_FAI_resource_recursive($baseToUse,"ou=".$name.",".$baseToUse,$NewReleaseName,$type,true); echo "

-- 2.30.2