Code

Fixed device checks.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Aug 2008 07:20:05 +0000 (07:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Aug 2008 07:20:05 +0000 (07:20 +0000)
-Fixed devId checks to force the input of a valid serial

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12217 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/devices/class_deviceGeneric.inc

index 59295598ae3bc429f7b5e9f0017d82ab9b59851a..8d7ce93947195f9e2ca01798c2407e7d3754c7fd 100644 (file)
@@ -96,6 +96,8 @@ class deviceGeneric extends plugin
     /* Skip serial check if vendor and product id are given */
     if(preg_match("/^\s+$/i",$this->devID)){
       $message[]= msgPool::invalid(_("iSerial"),"","01234");
+    }elseif(empty($this->devID) && $this->devID!="0"){
+      $message[]= msgPool::required(_("iSerial"));
     }
     if(empty($this->serial) || !$this->is_2byteHex($this->serial)){
       $message[]= msgPool::invalid(_("Serial"),"","","0x1234");