Code

Updated Workstation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 12:40:28 +0000 (12:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 12:40:28 +0000 (12:40 +0000)
-Corrected Error Messages for missing Sync values.

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

gosa-plugins/goto/admin/systems/goto/class_workstationService.inc

index e7c5feeaa18db32451099f71aca8db835d0b7cb5..1aae67b27c6a00f7cc8951f782b65ac444fdfb4f 100644 (file)
@@ -372,7 +372,9 @@ class workservice extends plugin
         $val= preg_replace ("/\s/", "", $this->gotoXVsync);
 
         if($this->acl_is_writeable("gotoXVsync")){
-          if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
+          if(empty($val)){
+            $message[]= msgPool::required(_("VSync"));
+          }elseif (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
             $message[]= msgPool::invalid(_("VSync"));
           } else{
             list($v1,$v2)= preg_split ("/[-+]/", $val);
@@ -387,7 +389,9 @@ class workservice extends plugin
         /* Check hsync for correct usage */
         $val= preg_replace ("/\s/", "", $this->gotoXHsync);
         if($this->acl_is_writeable("gotoXHsync")){
-          if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
+          if(empty($val)){
+            $message[]= msgPool::required(_("HSync"));
+          }elseif (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
             $message[]= msgPool::invalid(_("HSync"));
           } else{
             list($v1,$v2)= preg_split ("/[-+]/", $val);