diff options
author | root <root@cacert1.it-sls.de> | 2012-05-09 00:54:52 +0200 |
---|---|---|
committer | root <root@cacert1.it-sls.de> | 2012-05-09 00:54:52 +0200 |
commit | 2be71dbb4ab3bff875de731d4bc190c00d63515d (patch) | |
tree | 542e9bbbc776f7b1270637604e9b14ba7ee82167 /includes | |
parent | c30a104b972d6288558c09bf0f2f544fe9c800c1 (diff) | |
download | cacert-devel-2be71dbb4ab3bff875de731d4bc190c00d63515d.tar.gz cacert-devel-2be71dbb4ab3bff875de731d4bc190c00d63515d.tar.xz cacert-devel-2be71dbb4ab3bff875de731d4bc190c00d63515d.zip |
bug-1023 fixed some flaws detected by software review
Diffstat (limited to 'includes')
-rw-r--r-- | includes/wot.inc.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/wot.inc.php b/includes/wot.inc.php index a59a5b6..022bcbd 100644 --- a/includes/wot.inc.php +++ b/includes/wot.inc.php @@ -566,22 +566,22 @@ function AssureTextLine($field1,$field2) function AssureCCABoxLine($type,$text) { return; - AssureBoxLIne($type,$text); + AssureBoxLine($type,$text); } -function AssureBoxLine($type,$text) +function AssureBoxLine($type,$text,$checked) { ?> <tr> - <td class="DataTD"><input type="checkbox" name="<?=$type?>" value="1"></td> + <td class="DataTD"><input type="checkbox" name="<?=$type?>" <?=$checked?"checked":""?></td> <td class="DataTD"><?=$text?></td> </tr> <? } -function AssureMethodLine($text,$methods,$remark,$flag) +function AssureMethodLine($text,$methods,$remark) { - if (intval($flag) === 1) + if (count($method) != 1) { ?> <tr> @@ -590,7 +590,7 @@ function AssureMethodLine($text,$methods,$remark,$flag) <select name="method"> <? foreach($methods as $val) { ?> - <option value="<?=$val?>"<? if(array_key_exists('method',$_POST) && $val == $_POST['method']) echo " selected"; ?>><?=$val?></option> + <option value="<?=$val?>" <?=$val?></option> <? } ?> </select> @@ -600,7 +600,7 @@ function AssureMethodLine($text,$methods,$remark,$flag) <? } else { ?> - <input type="hidden" name="<?=$val?>" value="<?=$_POST['method']?>"> + <input type="hidden" name="<?=$val?>" value="<?=$method[0]?>"> <? } } |