From: hickert Date: Tue, 11 Sep 2007 12:04:25 +0000 (+0000) Subject: Updated dhcp take over X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=272c72c7075744fe0dd03db05e9ec13bbefd0f2c;p=gosa.git Updated dhcp take over git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7260 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index da5a12a28..aac60d367 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -21,6 +21,7 @@ class servdhcp extends plugin var $dhcp_server_list = array("ENTRIES"=> array(),"FOR_LIST"=> array()); var $take_over_id = -1; + var $display_warning = TRUE; function servdhcp ($config, $dn= NULL, $parent= NULL) { @@ -77,20 +78,6 @@ class servdhcp extends plugin } - function get_dhcp_info_string($id) - { - $ret = ""; - $ldap = $this->config->get_ldap_link(); - $ldap->cd("cn=dhcp,".$this->dhcp_server_list['ENTRIES'][$id]['dn']); - $ldap->search("(|(objectClass=dhcpSharedNetwork)(objectClass=dhcpSubnet)(objectClass=dhcpPool)(objectClass=dhcpGroup)(objectClass=dhcpHost))",array("dn","cn")); - $ldap->search("(objectClass=*)",array("dn","cn")); - while($attrs = $ldap->fetch()){ - $ret .= $attrs['dn']."\n"; - } - return($ret); - } - - function execute() { /* Call parent execute */ @@ -131,13 +118,14 @@ class servdhcp extends plugin if($this->take_over_id != -1){ $this->dialog = FALSE; $id = $this->take_over_id; - $info = $this->get_dhcp_info_string($id); $smarty->assign("dns_take_over",TRUE); - $smarty->assign("info",$info); - $warning = sprintf(_("You are going to migrate the DHCP setup from server '%s'."),$this->dhcp_server_list['ENTRIES'][$id]['cn'][0]); - $warning2 = _("The migration will be startet when you save this system. To cancel this action, use the cancel button below."); - $smarty->assign("warning",$warning); - $smarty->assign("warning2",$warning2); + $warning= " "._("This includes 'all' DNS zones that are located within this server. Please double check if your really want to do this."); + $warning.= " "._("The migration will be startet when you save this system. To cancel this action, use the cancel button below."); + + if($this->display_warning){ + print_red($warning); + $this->display_warning = FALSE; + } return($smarty->fetch(get_template_path('servdhcp.tpl', TRUE))); } diff --git a/plugins/admin/systems/servdhcp.tpl b/plugins/admin/systems/servdhcp.tpl index b394243a1..89b26fb19 100644 --- a/plugins/admin/systems/servdhcp.tpl +++ b/plugins/admin/systems/servdhcp.tpl @@ -3,10 +3,6 @@

{t}DHCP take over initiated{/t}

- {$warning} - {t}This includes 'all' DHCP subsections that are located within this server. Please double check if your really want to do this.{/t} -

- {$warning2}