Code

Updated dhcp handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Aug 2007 10:12:27 +0000 (10:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Aug 2007 10:12:27 +0000 (10:12 +0000)
When source object was moved/renamend the dhcp settings weren't updated

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7046 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc

index 8f0c21fc7668ed493c5d75f7e382f70547d665c9..6a932ef38b3ce1758edd15fcaa53653d23bac0fc 100644 (file)
@@ -562,8 +562,10 @@ class termDNS extends plugin
       if($this->initial_dhcp_is_Account && $this->dhcp_is_Account){
 
         /* DHCP node changed */
-        if($this->initial_dhcpParentNode != $this->dhcpParentNode){
+        if(($this->initial_dhcpParentNode != $this->dhcpParentNode) || 
+           ($this->cn != $this->OrigCn)){
           $attrs = $this->dhcpHostEntry;
+          $attrs['cn'] = $this->cn;
           unset($attrs['dn']);
           unset($attrs['MODIFIED']);
           $ldap->cd("cn=".$this->cn.",".$this->dhcpParentNode);