Code

A Stefan Koehler fix.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Jan 2007 04:42:24 +0000 (04:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Jan 2007 04:42:24 +0000 (04:42 +0000)
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

index 8bf8ae2980bec583493876f364ae755aef0f1a73..6a7a009a09fba2e67c753507526897ad257b6c1d 100644 (file)
@@ -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')");