From c09fe434d6b34caa356e3790e15d05cb9c32bb8d Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 23 Oct 2008 12:40:28 +0000 Subject: [PATCH] Updated Workstation -Corrected Error Messages for missing Sync values. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12771 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/class_workstationService.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index e7c5feeaa..1aae67b27 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -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); -- 2.30.2