diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-17 16:43:10 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-17 16:43:10 +0000 |
commit | 3695a20101806e32166923450b42add7b044b970 (patch) | |
tree | e825633717d44e4f7b5cdf451b03016901cd7f53 | |
parent | 9eaf71aa5dcdaa32ee823059500d60e597f856e4 (diff) | |
download | zabbix-3695a20101806e32166923450b42add7b044b970.tar.gz zabbix-3695a20101806e32166923450b42add7b044b970.tar.xz zabbix-3695a20101806e32166923450b42add7b044b970.zip |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2536 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r-- | frontends/php/config.php | 2 | ||||
-rw-r--r-- | frontends/php/include/validate.inc.php | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php index 1e5185fc..909af2e9 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -64,7 +64,7 @@ // VAR TYPE OPTIONAL TABLE FIELD OPTIONAL VALIDATION EXCEPTION $fields=array( "config"=> array(T_ZBX_INT, O_OPT, NULL, NULL, IN("0,1,3,4,5"), NULL), - "refresh_unsupported"=> array(T_ZBX_INT, O_MAND, "config", NULL, BETWEEN(30,65535), NULL) + "refresh_unsupported"=> array(T_ZBX_INT, O_NO, "config", NULL, BETWEEN(30,65535), 'in_array($_REQUEST["config"],0,5)') ); if(!check_fields($fields)) diff --git a/frontends/php/include/validate.inc.php b/frontends/php/include/validate.inc.php index 848a4099..b69d0ec8 100644 --- a/frontends/php/include/validate.inc.php +++ b/frontends/php/include/validate.inc.php @@ -104,6 +104,11 @@ else continue; } + if($opt == O_OPT) + { + if(!isset($_REQUEST[$field])) continue; + } + if( ($type == T_ZBX_INT) && !is_numeric($_REQUEST[$field])) { info("Field [".$field."] is not integer"); $ret = 0; continue; |