From: hickert Date: Mon, 10 Sep 2007 09:06:30 +0000 (+0000) Subject: Updated serv dhcp X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0684b770e9ed579b9d03db2986a379ded9e6b07b;p=gosa.git Updated serv dhcp git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7236 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index ce22ef93a..6390172a5 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -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 */