From be4d1b1ad82ea49966d9609ec9d052c052552ed6 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 16 Oct 2007 10:47:48 +0000 Subject: [PATCH] Fixed the dhcp configuration for arp-alert devices git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7572 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_ArpNewDevice.inc | 14 +++++++------- plugins/admin/systems/class_systemManagement.inc | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/admin/systems/class_ArpNewDevice.inc b/plugins/admin/systems/class_ArpNewDevice.inc index fb8275bef..763c4e8e3 100644 --- a/plugins/admin/systems/class_ArpNewDevice.inc +++ b/plugins/admin/systems/class_ArpNewDevice.inc @@ -6,7 +6,6 @@ class ArpNewDevice extends plugin var $netConfigDNS = NULL; var $attributes= array("cn","description"); var $objectclasses = array("gotoHard"); - var $ignore_account = TRUE; function ArpNewDevice ($config, $dn= NULL, $parent= NULL) @@ -19,6 +18,13 @@ class ArpNewDevice extends plugin function execute() { + $smarty = get_smarty(); + foreach($this->attributes as $attr){ + $smarty->assign($attr,$this->$attr); + } + $this->netConfigDNS->cn= $this->cn; + $smarty->assign("netconfig", $this->netConfigDNS->execute()); + /* Display sub dialog from network settings */ $this->netConfigDNS->acl = $this->acl; if($this->netConfigDNS->dialog){ @@ -28,12 +34,6 @@ class ArpNewDevice extends plugin $this->dialog = FALSE; } - $smarty = get_smarty(); - foreach($this->attributes as $attr){ - $smarty->assign($attr,$this->$attr); - } - $this->netConfigDNS->cn= $this->cn; - $smarty->assign("netconfig", $this->netConfigDNS->execute()); return($smarty->fetch (get_template_path('ArpNewDevice.tpl', TRUE))); } diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 37d2aadc5..3e6da3dde 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -835,6 +835,8 @@ class systems extends plugin function get_system_type($classes) { + $enable_arp_device_handling = preg_match("/ArpNewDevice/i",search_config($this->config->data['TABS'], "ArpNewDevice", "CLASS")); + $type= ""; if (in_array_ics('ieee802Device', $classes)){ $type= "component"; @@ -848,7 +850,7 @@ class systems extends plugin $type= "phone"; }elseif (in_array_ics('goServer', $classes)){ $type= "server"; - }elseif (in_array_ics('GOhard', $classes)&& !in_array('gotoMode', $classes)){ + }elseif (in_array_ics('GOhard', $classes)&& !in_array('gotoMode', $classes) && $enable_arp_device_handling){ $type= "ArpNewDevice"; }elseif (in_array_ics('GOhard', $classes)){ $type= "NewDevice"; -- 2.30.2