Code

Added missing check
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Jan 2010 11:48:18 +0000 (11:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Jan 2010 11:48:18 +0000 (11:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15155 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc

index 4489bdeba96e6b3b659c95ef5b4b39ad4b9fb059..1b536bff509c184a8813734fd68c1e4fb4b24db1 100644 (file)
@@ -6,6 +6,9 @@ class filterSYSTEMS {
   {
     $ui = get_userinfo();
 
+    // Check whether the arp handling active or not
+    $arp_handling_active = ($this->config->search("ArpNewDevice","CLASS",array('tabs')) != "")
+
     $entries = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
     foreach($entries as $key => $entry){
       if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'),'/')."/i", $entry['dn'])){
@@ -17,7 +20,9 @@ class filterSYSTEMS {
         }elseif(in_array('gotoTerminal', $entry['objectClass'])){
           $entries[$key]['objectClass'][] = 'FAKE_OC_NewTerminal';
           $entries[$key]['cn'][0].= " <i>("._("New terminal").")</i>";
-        }elseif(in_array('GOhard', $entry['objectClass']) && !isset($entry['gotoMode'][0])){ 
+        }elseif($arp_handling_active && 
+            in_array('GOhard', $entry['objectClass']) && 
+            !isset($entry['gotoMode'][0])){ 
           $entries[$key]['objectClass'][] = 'FAKE_OC_ArpNewDevice';
           $entries[$key]['cn'][0].= " <i>("._("New unknown device").")</i>";
         }elseif(in_array('GOhard', $entry['objectClass'])){
index 97219fb733e290517589aa1a66ce30a7b09b789a..1ba0f53aad4f017fc33d04b3542e5c4b603ad988 100644 (file)
@@ -73,7 +73,6 @@ class systemManagement extends management
   protected $objectName   = "system";
   protected $objectInfo = array();
   protected $opsi = NULL;
-  protected $arp_handling_active = FALSE;
   protected $activationQueue  = array();
 
   function __construct($config,$ui)
@@ -139,11 +138,6 @@ class systemManagement extends management
       $this->snapHandler = new SnapshotHandler($this->config);
     }
 
-    // Check whether the arp handling active or not 
-    if($this->config->search("ArpNewDevice","CLASS",array('tabs')) != ""){
-      $this->arp_handling_active = TRUE;
-    }
-
     // Check if we are able to communicate with the GOsa supprot daemon
     if(class_available("gosaSupportDaemon")){
       $o = new gosaSupportDaemon();