From c0498bfad7f49f8f1be01bd5205ffbe841b73409 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 13 Aug 2007 09:14:21 +0000 Subject: [PATCH] Updated POST handling for dhcpHost. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7045 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_dhcpHost.inc | 14 ++++++++------ plugins/admin/systems/class_termDNS.inc | 2 ++ plugins/admin/systems/dhcp_host.tpl | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/admin/systems/class_dhcpHost.inc b/plugins/admin/systems/class_dhcpHost.inc index 479707c00..c6ce4dacf 100644 --- a/plugins/admin/systems/class_dhcpHost.inc +++ b/plugins/admin/systems/class_dhcpHost.inc @@ -96,7 +96,7 @@ class dhcpHost extends dhcpPlugin function save_object() { /* Save remaining attributes */ - if (isset($_POST['hwtype'])){ + if (isset($_POST['dhcp_host_posted'])){ /* Assemble hwAddress */ if (isset($_POST['dhcpHWAddress'])){ @@ -108,10 +108,12 @@ class dhcpHost extends dhcpPlugin } /* Save fixed address */ - if (!$this->realGosaHost && $_POST['fixedaddr'] != ""){ - $this->statements['fixed-address']= get_post('fixedaddr'); - } else { - unset ($this->statements['fixed-address']); + if(!$this->realGosaHost){ + if ($_POST['fixedaddr'] != ""){ + $this->statements['fixed-address']= get_post('fixedaddr'); + } else { + unset ($this->statements['fixed-address']); + } } $this->options['host-name']= $this->cn; } @@ -170,5 +172,5 @@ class dhcpHost extends dhcpPlugin } } - +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 6c82146b1..8f0c21fc7 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -553,6 +553,8 @@ class termDNS extends plugin unset($attrs['dn']); $ldap->cd("cn=".$this->cn.",".$this->dhcpParentNode); $res = $ldap->add($attrs); +# print_a($attrs); +# print("cn=".$this->cn.",".$this->dhcpParentNode); show_ldap_error($ldap->get_error(),_("Tried to add new dhcp entry failed.")); } diff --git a/plugins/admin/systems/dhcp_host.tpl b/plugins/admin/systems/dhcp_host.tpl index c5ee7a281..602c51255 100644 --- a/plugins/admin/systems/dhcp_host.tpl +++ b/plugins/admin/systems/dhcp_host.tpl @@ -41,7 +41,7 @@ - +

-- 2.30.2