From a365c3ece8cc71a63fca80c5d1bdd02022d5e552 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Jan 2007 04:42:24 +0000 Subject: [PATCH] A Stefan Koehler fix. Hot plug create: If product and vendor id are given skip check check for serial number. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5497 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/environment/class_hotplugDialog.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc index 8bf8ae298..6a7a009a0 100644 --- a/plugins/personal/environment/class_hotplugDialog.inc +++ b/plugins/personal/environment/class_hotplugDialog.inc @@ -130,8 +130,11 @@ class hotplugDialog extends plugin $message[]=_("Invalid character in description. Please specify a valid description."); } - if(empty($this->HOT_id) || preg_match("/[\|\*]/i",$this->HOT_id)){ - $message[]=_("Please specify a valid id."); + /* 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 id."); + } } 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