From 9ea4d1e7b021cb67d5337196a9da18b5b6eb3f6f Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 1 Oct 2007 11:15:33 +0000 Subject: [PATCH] Fixed usb hotplugs git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7436 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/environment/class_environment.inc | 10 ++++++++++ plugins/personal/environment/class_hotplugDialog.inc | 8 +++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 3ab9a5c5b..f209ef1a0 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -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; } } diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc index 2fbd3588e..31d5abddb 100644 --- a/plugins/personal/environment/class_hotplugDialog.inc +++ b/plugins/personal/environment/class_hotplugDialog.inc @@ -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')"); -- 2.30.2