Code

Fixed dhcp saving for renamed objects
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Oct 2007 10:57:32 +0000 (10:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Oct 2007 10:57:32 +0000 (10:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7573 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc

index b926611329cc5d30bf70d3bfdaa8ecba7585c175..97abc0633d57935de9f292ecb20025cab287a0b2 100644 (file)
@@ -559,10 +559,15 @@ class termDNS extends plugin
 
       /* DHCP Added */
       if(!$this->initial_dhcp_is_Account && $this->dhcp_is_Account){
+
+        $dn = "cn=".$this->cn.",".$this->dhcpParentNode;
+
         $attrs = $this->dhcpHostEntry;
+        $attrs['cn'] = $this->cn;
+        
         unset($attrs['MODIFIED']);
         unset($attrs['dn']);
-        $ldap->cd("cn=".$this->cn.",".$this->dhcpParentNode);
+        $ldap->cd($dn);
         $res = $ldap->add($attrs);
 #        print_a($attrs);
 #        print("cn=".$this->cn.",".$this->dhcpParentNode);