From: hickert Date: Fri, 11 Apr 2008 09:24:24 +0000 (+0000) Subject: Fixed renaming of profiles X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4082c0b395cfba9f8e56407c2d28b23f5df4c38c;p=gosa.git Fixed renaming of profiles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10351 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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){