Code

Fixed ip change problem
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:46:57 +0000 (14:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:46:57 +0000 (14:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@10066 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc

index 274424ab5180bf77f548ce68faa0edea308341b4..252d990625785d8aed6e22230306bff37097b08f 100644 (file)
@@ -565,6 +565,15 @@ class termDNS extends plugin
         }
       }
   
+      /* Updated IP host number */
+      if($this->dhcp_is_Account){
+        foreach($this->dhcpHostEntry['dhcpStatements'] as $id => $value){
+          if(preg_match("/^fixed-address/",$value)){
+            $this->dhcpHostEntry['dhcpStatements'][$id] = "fixed-address ".$this->ipHostNumber;
+            $this->dhcpHostEntry['MODIFIED'] = TRUE;
+          }
+        }
+      }
 
       /* Unset dhcpStatements if this attribute is empty  */
       if(isset($this->dhcpHostEntry['dhcpStatements']) &&