summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-08-01 03:32:15 +0200
committerMichael Tänzer <neo@nhng.de>2011-08-01 03:32:15 +0200
commit1262ff0b1c8cf748c0dc6ed502d80c579ae672ca (patch)
tree4851d0e52d5f2ffc3d39c5a3cb0a50f5112a2bde
parent4230707947899c893fda70cd9addd592580a477e (diff)
parentf5cca0215ef95189fd24966e3260948605df0e5e (diff)
downloadcacert-devel-1262ff0b1c8cf748c0dc6ed502d80c579ae672ca.tar.gz
cacert-devel-1262ff0b1c8cf748c0dc6ed502d80c579ae672ca.tar.xz
cacert-devel-1262ff0b1c8cf748c0dc6ed502d80c579ae672ca.zip
Merge branch 'bug-959' into release2011-08-01
-rw-r--r--www/wot.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/www/wot.php b/www/wot.php
index 2bd4622..7fa572f 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -206,9 +206,15 @@
if($oldid == 6)
{
$max = maxpoints();
- $awarded = $newpoints = intval($_POST['points']);
- if($newpoints > $max)
- $newpoints = $max;
+
+ if (intval($_POST['points']) > $max) {
+ $awarded = $newpoints = $max;
+ } elseif (intval($_POST['points']) < 0) {
+ $awarded = $newpoints = 0;
+ } 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);