summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fea57ca)
raw | patch | inline | side by side (parent: fea57ca)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Oct 2009 09:22:52 +0000 (09:22 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Oct 2009 09:22:52 +0000 (09:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14700 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_workstationService.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
index 41f00a8f8a8887de0467d2a7c7ba2bafdd2144c3..5b6329e6d6addc92bc10c91172e27c56a69eca86 100644 (file)
if($this->acl_is_writeable("gotoXVsync")){
if(empty($val)){
$message[]= msgPool::required(_("VSync"));
- }elseif (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
+ }elseif (!preg_match ("/^\d+(\.\d+)?([+-]\d+(\.\d+)?)?$/", $val)){
$message[]= msgPool::invalid(_("VSync"));
} else{
- list($v1,$v2)= preg_split ("/[-+]/", $val);
- if ($v2 != ""){
- if ($v1 > $v2){
- $message[]= msgPool::invalid(_("VSync"));
+ if (!preg_match('/^\d+$/', $val)){
+ list($v1,$v2)= preg_split ("/[-+]/", $val);
+ if ($v2 != ""){
+ if ($v1 > $v2){
+ $message[]= msgPool::invalid(_("VSync"));
+ }
}
}
}
}elseif (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
$message[]= msgPool::invalid(_("HSync"));
} else{
- list($v1,$v2)= preg_split ("/[-+]/", $val);
- if ($v2 != ""){
- if ($v1 > $v2){
- $message[]= msgPool::invalid(_("HSync"));
+ if (!preg_match('/^\d+$/', $val)){
+ list($v1,$v2)= preg_split ("/[-+]/", $val);
+ if ($v2 != ""){
+ if ($v1 > $v2){
+ $message[]= msgPool::invalid(_("HSync"));
+ }
}
}
}