From: hickert Date: Tue, 28 Aug 2007 09:19:14 +0000 (+0000) Subject: Ensure that dhcpServiceDN will be updated to currect dn, if parent is renamed or... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e117519960c50413819974d28a3e55af05a08b7a;p=gosa.git Ensure that dhcpServiceDN will be updated to currect dn, if parent is renamed or moved. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7153 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index 6538952b1..168d7a8e8 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -419,8 +419,10 @@ class servdhcp extends plugin } } - /* Self modify and place service dn entry */ - $this->dhcpServiceDN= $this->dn; + $this->dhcpServiceDN= $this->serviceDN; + if($this->dn != $this->orig_dn){ + $this->dhcpServiceDN= preg_replace("/".normalizePreg($this->orig_dn)."$/i",$this->dn,$this->dhcpServiceDN); + } plugin::save();