From 4082c0b395cfba9f8e56407c2d28b23f5df4c38c Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 11 Apr 2008 09:24:24 +0000 Subject: [PATCH] Fixed renaming of profiles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10351 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiProfile.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc index 212ea1dde..c5daa10a7 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -430,6 +430,13 @@ class faiProfile extends plugin $this->attrs['FAIclass']=trim($this->FAIclass); + /* Remove the old FAI profile, if the dn has changed. + */ + if($this->cn != $this->old_cn){ + + $old_dn = preg_replace("/^cn=[^,]+,/","cn=".$this->old_cn.",",$this->dn); + FAI::prepare_to_save_FAI_object($old_dn,array(),TRUE); + } FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); if($this->initially_was_account){ -- 2.30.2