diff options
author | Michael Tänzer <neo@nhng.de> | 2011-07-13 02:19:41 +0200 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2011-07-13 02:19:41 +0200 |
commit | b24134a0a06df0855652457a28d8077e24a7a354 (patch) | |
tree | d6ba6d3f55360ac7ff80492ce0df909626fe5e3d /www/wot.php | |
parent | 00675c949494888ac5f3cd802de41bf6f2caf45b (diff) | |
download | cacert-devel-b24134a0a06df0855652457a28d8077e24a7a354.tar.gz cacert-devel-b24134a0a06df0855652457a28d8077e24a7a354.tar.xz cacert-devel-b24134a0a06df0855652457a28d8077e24a7a354.zip |
bug 959: Limit the awarded points to the maximum number of points the
user may issue
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'www/wot.php')
-rw-r--r-- | www/wot.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/www/wot.php b/www/wot.php index 2bd4622..1941861 100644 --- a/www/wot.php +++ b/www/wot.php @@ -206,9 +206,13 @@ if($oldid == 6) { $max = maxpoints(); - $awarded = $newpoints = intval($_POST['points']); - if($newpoints > $max) - $newpoints = $max; + + if (intval($_POST['points']) > $max) { + $awarded = $newpoints = $max; + } else { + $awarded = $newpoints = intval($_POST['points']); + } + $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' group by `to`"; $res = mysql_query($query); $drow = mysql_fetch_assoc($res); |