summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2015-04-21 22:12:56 +0200
committerFelix Dörre <felix@dogcraft.de>2015-04-21 22:12:56 +0200
commit9edbfedb3b84f217c2c16cdf2b7bb5bfb97b0028 (patch)
tree720ae87ad6a3d610d0f6dc41f5457f42fa71aa4f
parent789164b7fe19751b597c1b41c52e9691e1587d5e (diff)
downloadcacert-devel-9edbfedb3b84f217c2c16cdf2b7bb5bfb97b0028.tar.gz
cacert-devel-9edbfedb3b84f217c2c16cdf2b7bb5bfb97b0028.tar.xz
cacert-devel-9edbfedb3b84f217c2c16cdf2b7bb5bfb97b0028.zip
bug 1050: repatch www/wot.php to use functions from 1047
-rw-r--r--www/wot.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/www/wot.php b/www/wot.php
index e28233b..08c6357 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -342,16 +342,14 @@ function send_reminder()
if($newpoints < 0)
$newpoints = $awarded = 0;
- $query = "select sum(`awarded`) as `total` from `notary` where `to`='".intval($_SESSION['_config']['notarise']['id'])."' and `deleted` = 0 group by `to`";
- $res = mysql_query($query);
- $drow = mysql_fetch_assoc($res);
+ $drow_points = get_received_total_points(intval($_SESSION['_config']['notarise']['id']));
$_POST['expire'] = 0;
- if(($drow['total'] + $newpoints) > 100 && $max < 100)
- $newpoints = 100 - $drow['total'];
- if(($drow['total'] + $newpoints) > $max && $max >= 100)
- $newpoints = $max - $drow['total'];
+ if(($drow_points + $newpoints) > 100 && $max < 100)
+ $newpoints = 100 - $drow_points;
+ if(($drow_points + $newpoints) > $max && $max >= 100)
+ $newpoints = $max - $drow_points;
if($newpoints < 0)
$newpoints = 0;