Code

Updated serv dhcp
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Sep 2007 09:06:30 +0000 (09:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Sep 2007 09:06:30 +0000 (09:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7236 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDHCP.inc

index ce22ef93a121ed058529c2dbe1a3bc1f0a1e3d2e..6390172a5e29219982fee87d728fbf361a885bba 100644 (file)
@@ -19,7 +19,7 @@ class servdhcp extends plugin
 
   var $orig_dn = "";
 
-  var $dhcp_server_list   = array();
+  var $dhcp_server_list   = array("ENTRIES"=> array(),"FOR_LIST"=> array());
   var $take_over_id       = -1;
 
   function servdhcp ($config, $dn= NULL, $parent= NULL)
@@ -50,9 +50,8 @@ class servdhcp extends plugin
     $this->reload(); 
     if (!count($this->dhcpSections)){
       $this->is_account= FALSE;
+      $this->dhcp_server_list = $this->get_list_of_dhcp_servers();
     }
-               
-    $this->dhcp_server_list = $this->get_list_of_dhcp_servers();
   }
 
   
@@ -529,6 +528,11 @@ class servdhcp extends plugin
       $this->dhcpServiceDN= preg_replace("/".normalizePreg($this->orig_dn)."$/i",$this->dn,$this->dhcpServiceDN);
     }
 
+    /* Replace 'new' dn */ 
+    if(preg_match("/new$/",$this->dhcpServiceDN)){
+      $this->dhcpServiceDN = preg_replace("/new$/",$this->dn,$this->dhcpServiceDN);
+    }
+
     plugin::save();
     
     /* Save data to LDAP */