Code

Fixed usb hotplugs
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Oct 2007 11:15:33 +0000 (11:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Oct 2007 11:15:33 +0000 (11:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7436 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc
plugins/personal/environment/class_hotplugDialog.inc

index 3ab9a5c5b9db4dc1f09bbd2517d5ac5c22457a84..f209ef1a08ffc229f03069c70ce0d16d3bc7f5df 100644 (file)
@@ -110,6 +110,16 @@ class environment extends plugin
         $tmp2['name']        = $tmp[0]; 
         $tmp2['description'] = $tmp[1]; 
         $tmp2['id']          = $tmp[2]; 
+        if(isset($tmp[3])){
+          $tmp2['produkt']     = $tmp[3];
+        }else{
+          $tmp2['produkt']     = "";
+        }
+        if(isset($tmp[4])){
+          $tmp2['vendor']      = $tmp[4];
+        }else{
+          $tmp2['vendor']      = "";
+        }
         $this->gotoHotplugDevices[$tmp[0]]=$tmp2;
       }
     }
index 2fbd3588ed2910eae612a400f6c6c5830f26333d..31d5abddb1d0dbd08899e2bcf18b217557ef1c84 100644 (file)
@@ -10,7 +10,7 @@ class hotplugDialog extends plugin
 
   var $HOT_name                 = "";
   var $HOT_description          = "";
-  var $HOT_id                   = "";
+  var $HOT_id                   = "0x0000";
   var $HOT_produkt              = "";
   var $HOT_vendor               = "";
 
@@ -126,10 +126,8 @@ class hotplugDialog extends plugin
       }
 
       /* Skip serial check if vendor and product id are given */
-      if((empty($this->HOT_vendor)) || (empty($this->HOT_produkt))){
-        if(empty($this->HOT_id) || preg_match("/[\|\*]/i",$this->HOT_id)){
-          $message[]=_("Please specify a valid iSerial.");
-        }
+      if(empty($this->HOT_id) || preg_match("/[\|\*]/i",$this->HOT_id)){
+        $message[]=_("Please specify a valid iSerial.");
       }
       if(empty($this->HOT_vendor) || !$this->is_2byteHex($this->HOT_vendor)){
         $message[]=_("Please specify a valid vendor ID. (2 byte hex like '0xFFFF')");