Code

Fixed the dhcp configuration for arp-alert devices
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Oct 2007 10:47:48 +0000 (10:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Oct 2007 10:47:48 +0000 (10:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7572 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_ArpNewDevice.inc
plugins/admin/systems/class_systemManagement.inc

index fb8275bef8dbac9e029c70dde1532d7e2764ce99..763c4e8e37014c71b24f56c4a44e4fe4be30d72c 100644 (file)
@@ -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)));
   }
 
index 37d2aadc50cb20393df256045dbcc1580e37853f..3e6da3dde20d5d98411222dd0fb5bc54dca67289 100644 (file)
@@ -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";